Skip to content

Commit

Permalink
platform/chrome: cros_ec: Do not attempt to register a non-positive I…
Browse files Browse the repository at this point in the history
…RQ 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@chromium.org>
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
  • Loading branch information
Gwendal Grignou authored and Enric Balletbo i Serra committed Nov 21, 2019
1 parent 05a3c42 commit da94658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/chrome/cros_ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit da94658

Please sign in to comment.