Skip to content

Commit da94658

Browse files
gwendalcrEnric Balletbo i Serra
authored andcommitted
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 <[email protected]> Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]>
1 parent 05a3c42 commit da94658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/chrome/cros_ec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
149149
return err;
150150
}
151151

152-
if (ec_dev->irq) {
152+
if (ec_dev->irq > 0) {
153153
err = devm_request_threaded_irq(dev, ec_dev->irq,
154154
ec_irq_handler,
155155
ec_irq_thread,

0 commit comments

Comments
 (0)