power: supply: cpcap-battery: Fix platform_get_irq_byname's error checking
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 24 Nov 2017 17:01:40 +0000 (22:31 +0530)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Fri, 1 Dec 2017 15:22:10 +0000 (16:22 +0100)
commitaac799040731ee338b84d27c27fa2d903e89c857
tree271cca9b24f66ea771e8ffe7383289921a8da4ea
parent09edcb647542487864e23aa8d2ef26be3e08978a
power: supply: cpcap-battery: Fix platform_get_irq_byname's error checking

The platform_get_irq_byname() function returns -1 if an error occurs.
zero or positive number on success. platform_get_irq_byname() error
checking for zero is not correct.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/cpcap-battery.c