From: Ye.Li Date: Mon, 4 Jan 2016 07:26:30 +0000 (+0800) Subject: pfuze: Fix unsigned variable for less-than-zero comparison X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=7ea191aa10c43b5497d171ab6f48e633e6779468;p=u-boot.git pfuze: Fix unsigned variable for less-than-zero comparison According to the Coverity result, a unsigned int variable is used fo less- than-zero comparison, the result is never true. Need to fix the variable type to signed int. Signed-off-by: Ye.Li Signed-off-by: Peng Fan Cc: Przemyslaw Marczak Cc: Stefano Babic Reviewed-by: Stefano Babic --- diff --git a/board/freescale/common/pfuze.c b/board/freescale/common/pfuze.c index 783c46d882..69afa83562 100644 --- a/board/freescale/common/pfuze.c +++ b/board/freescale/common/pfuze.c @@ -13,7 +13,8 @@ int pfuze_mode_init(struct pmic *p, u32 mode) { unsigned char offset, i, switch_num; - u32 id, ret; + u32 id; + int ret; pmic_reg_read(p, PFUZE100_DEVICEID, &id); id = id & 0xf;