]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
drivers/power/pmic/pm8916.c: Make usid be uint32_t
authorTom Rini <trini@konsulko.com>
Tue, 12 Apr 2016 19:11:24 +0000 (15:11 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 18 Apr 2016 21:11:42 +0000 (17:11 -0400)
If get_dev_addr fails it will return FDT_ADDR_T_NONE and:
>>>     "priv->usid == 4294967295U" is always false regardless of the values of its operands. This occurs as the logical operand of if.

Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Reported-by: Coverity (CID: 143914)
Signed-off-by: Tom Rini <trini@konsulko.com>
drivers/power/pmic/pm8916.c

index 9acf5f55f7362eb34a54252363e8c85939c9f0f6..d4c7d4adff1fd53fb1db33ec495ac175a84f4a81 100644 (file)
@@ -18,7 +18,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define REG_MASK 0xFF
 
 struct pm8916_priv {
-       uint16_t usid; /* Slave ID on SPMI bus */
+       uint32_t usid; /* Slave ID on SPMI bus */
 };
 
 static int pm8916_reg_count(struct udevice *dev)