lkml.org 
[lkml]   [2019]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 06/18] platform: chrome: cros_ec: Do not attempt to register a non-positive IRQ number
From
Date


On 21/10/19 7:53, Gwendal Grignou wrote:
> From: Enrico Granata <egranata@chromium.org>
>
> Add a layer of sanity checking to cros_ec_register against attempting to
> register IRQ values that are not strictly greater than 0.
>
> Signed-off-by: Enrico Granata <egranata@chromium.org>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>

Enrico, Gwendal, this can be applied alone without waiting for the others, right?

For my own reference:

Acked-for-chrome-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>


> ---
> Changes in v2:
> Remove dual Enrico's signature.
>
> drivers/platform/chrome/cros_ec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c
> index 739f3cffe26e3..9b19f50572313 100644
> --- a/drivers/platform/chrome/cros_ec.c
> +++ b/drivers/platform/chrome/cros_ec.c
> @@ -149,7 +149,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
> return err;
> }
>
> - if (ec_dev->irq) {
> + if (ec_dev->irq > 0) {
> err = devm_request_threaded_irq(
> dev, ec_dev->irq, ec_irq_handler,
> ec_irq_thread, IRQF_TRIGGER_LOW | IRQF_ONESHOT,
>

\
 
 \ /
  Last update: 2019-10-22 12:06    [W:0.200 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site