diff options
author | Pan Bian <bianpan2016@163.com> | 2017-11-12 16:52:02 +0100 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.co.uk> | 2017-11-13 11:56:12 +0100 |
commit | 838c8afa67f98014970c9f56107805e767ed87ad (patch) | |
tree | 60faf31c3ca8e32304d500efbe2ba975a693746f /drivers/power/supply/ab8500_bmdata.c | |
parent | power: supply: replace pr_* with dev_* (diff) | |
download | linux-838c8afa67f98014970c9f56107805e767ed87ad.tar.xz linux-838c8afa67f98014970c9f56107805e767ed87ad.zip |
power: supply: cpcap-charger: fix incorrect return value check
Function platform_get_irq_byname() returns a negative error code on
failure, and a zero or positive number on success. However, in function
cpcap_usb_init_irq(), positive IRQ numbers are also taken as error
cases. Use "if (irq < 0)" instead of "if (!irq)" to validate the return
value of platform_get_irq_byname().
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/power/supply/ab8500_bmdata.c')
0 files changed, 0 insertions, 0 deletions