diff options
author | Peng Fan <peng.fan@nxp.com> | 2017-05-11 10:20:56 +0800 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2017-05-11 13:41:38 +0800 |
commit | 95b2ee328ead6899a78ce92fe9bf27547ced6671 (patch) | |
tree | 487eed78eb1aa5efc67bfdf550bf1c79fce9f225 | |
parent | 3f8052264b97b0bf87452876307ca115b7a518a3 (diff) | |
download | u-boot-imx-95b2ee328ead6899a78ce92fe9bf27547ced6671.zip u-boot-imx-95b2ee328ead6899a78ce92fe9bf27547ced6671.tar.gz u-boot-imx-95b2ee328ead6899a78ce92fe9bf27547ced6671.tar.bz2 |
MLK-14864: regulator: pfuze100: unsigned compared against 0
Fix coverity:392391 392382 392385 Unsigned compared against 0
Signed-off-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r-- | drivers/power/regulator/pfuze100.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c index 4702161..ad2b105 100644 --- a/drivers/power/regulator/pfuze100.c +++ b/drivers/power/regulator/pfuze100.c @@ -1,3 +1,9 @@ +/* + * Copyright 2017 NXP + * + * SPDX-License-Identifier: GPL-2.0+ + */ + #include <common.h> #include <fdtdec.h> #include <errno.h> @@ -306,7 +312,7 @@ static int pfuze100_regulator_probe(struct udevice *dev) static int pfuze100_regulator_mode(struct udevice *dev, int op, int *opmode) { - unsigned char val; + int val; struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev); struct pfuze100_regulator_desc *desc = plat->desc; @@ -376,7 +382,7 @@ static int pfuze100_regulator_mode(struct udevice *dev, int op, int *opmode) static int pfuze100_regulator_enable(struct udevice *dev, int op, bool *enable) { - unsigned char val; + int val; int ret, on_off; struct dm_regulator_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev); @@ -440,7 +446,7 @@ static int pfuze100_regulator_enable(struct udevice *dev, int op, bool *enable) static int pfuze100_regulator_val(struct udevice *dev, int op, int *uV) { int i; - unsigned char val; + int val; struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev); struct pfuze100_regulator_desc *desc = plat->desc; struct dm_regulator_uclass_platdata *uc_pdata = |