power: regulator: palmas: Cannot test unsigned for being negative
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 7 Aug 2025 16:35:20 +0000 (17:35 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 29 Aug 2025 22:45:19 +0000 (16:45 -0600)
commit96312ed79630838b09368c8c07ec164fd40a025c
treeebc40175acef719011ecd68fc2f09c9066a3a094
parent8f90028ccdbfc74487c4b40bd6fe5d34c3309b7a
power: regulator: palmas: Cannot test unsigned for being negative

In palmas_smps_val and palmas_ldo_val hex is an unsigned variable being
assigned the return value from a function that returns int. Change hex
to be an int so that the following test for an error as a negative value
will work as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
drivers/power/regulator/palmas_regulator.c