power: supply: axp288_fuel_gauge: Added check for negative values
authorDenis Arefev <arefev@swemel.ru>
Tue, 6 Dec 2022 09:17:23 +0000 (12:17 +0300)
committerSebastian Reichel <sre@kernel.org>
Thu, 9 Mar 2023 23:20:43 +0000 (00:20 +0100)
commitbf6c880d5d1448489ebf92e2d13d5713ff644930
tree609adc87075c7f1a0bca2dfefaadd3bf5d618984
parent14c76b2e75bca4d96e2b85a0c12aa43e84fe3f74
power: supply: axp288_fuel_gauge: Added check for negative values

Variable 'pirq', which may receive negative value
in platform_get_irq().
Used as an index in a function regmap_irq_get_virq().

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Denis Arefev <arefev@swemel.ru>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/axp288_fuel_gauge.c