mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 22:53:55 +08:00
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@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>
This commit is contained in:
parent
05a3c420ea
commit
da946589b1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user