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

In tps65941_buck_val and tps65941_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/tps65941_regulator.c