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

In lp873x_buck_val and lp873x_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/lp873x_regulator.c