Commit 95b2ee328ead6899a78ce92fe9bf27547ced6671
1 parent
3f8052264b
Exists in
smarc-n7.1.2_2.0.0-ga
and in
4 other branches
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>
Showing 1 changed file with 9 additions and 3 deletions Side-by-side Diff
drivers/power/regulator/pfuze100.c
1 | +/* | |
2 | + * Copyright 2017 NXP | |
3 | + * | |
4 | + * SPDX-License-Identifier: GPL-2.0+ | |
5 | + */ | |
6 | + | |
1 | 7 | #include <common.h> |
2 | 8 | #include <fdtdec.h> |
3 | 9 | #include <errno.h> |
... | ... | @@ -306,7 +312,7 @@ |
306 | 312 | |
307 | 313 | static int pfuze100_regulator_mode(struct udevice *dev, int op, int *opmode) |
308 | 314 | { |
309 | - unsigned char val; | |
315 | + int val; | |
310 | 316 | struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev); |
311 | 317 | struct pfuze100_regulator_desc *desc = plat->desc; |
312 | 318 | |
... | ... | @@ -376,7 +382,7 @@ |
376 | 382 | |
377 | 383 | static int pfuze100_regulator_enable(struct udevice *dev, int op, bool *enable) |
378 | 384 | { |
379 | - unsigned char val; | |
385 | + int val; | |
380 | 386 | int ret, on_off; |
381 | 387 | struct dm_regulator_uclass_platdata *uc_pdata = |
382 | 388 | dev_get_uclass_platdata(dev); |
... | ... | @@ -440,7 +446,7 @@ |
440 | 446 | static int pfuze100_regulator_val(struct udevice *dev, int op, int *uV) |
441 | 447 | { |
442 | 448 | int i; |
443 | - unsigned char val; | |
449 | + int val; | |
444 | 450 | struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev); |
445 | 451 | struct pfuze100_regulator_desc *desc = plat->desc; |
446 | 452 | struct dm_regulator_uclass_platdata *uc_pdata = |