mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
power: regulator: lp87565: Cannot test unsigned for being negative
In lp87565_buck_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>
This commit is contained in:
committed by
Tom Rini
parent
42f959d0b0
commit
8f90028ccd
@@ -82,8 +82,8 @@ static int lp87565_buck_val2volt(int val)
|
||||
|
||||
static int lp87565_buck_val(struct udevice *dev, int op, int *uV)
|
||||
{
|
||||
unsigned int hex, adr;
|
||||
int ret;
|
||||
unsigned int adr;
|
||||
int hex, ret;
|
||||
struct dm_regulator_uclass_plat *uc_pdata;
|
||||
|
||||
uc_pdata = dev_get_uclass_plat(dev);
|
||||
|
||||
Reference in New Issue
Block a user