Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
- Loading branch information