[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191115093412.144922-6-gwendal@chromium.org>
Date: Fri, 15 Nov 2019 01:33:59 -0800
From: Gwendal Grignou <gwendal@...omium.org>
To: dmitry.torokhov@...il.com, groeck@...omium.org,
briannorris@...omium.org, jic23@...nel.org, knaack.h@....de,
lars@...afoo.de, pmeerw@...erw.net, lee.jones@...aro.org,
bleung@...omium.org, enric.balletbo@...labora.com,
dianders@...omium.org, fabien.lahoudere@...labora.com
Cc: linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
linux-input@...r.kernel.org,
Gwendal Grignou <gwendal@...omium.org>,
Enrico Granata <egranata@...omium.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: [PATCH v5 05/18] platform: chrome: cros_ec: Do not attempt to register a non-positive IRQ number
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@...omium.org>
Signed-off-by: Gwendal Grignou <gwendal@...omium.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Acked-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
Acked-by: Lee Jones <lee.jones@...aro.org>
---
No changes in v5, v4, v3.
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 925f84dbf621..d3dfa27171e6 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,
--
2.24.0.432.g9d3f5f5b63-goog
Powered by blists - more mailing lists