summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-04-12 15:11:23 -0400
committerTom Rini <trini@konsulko.com>2016-04-18 17:11:42 -0400
commitaa997d1d774416b3525d44779ee7ff9914b6abcb (patch)
treeb289b12c1526eb8544f69a04c4c5e508524af6b0 /drivers/gpio
parent55ac54c4a0acbdc786b16dc1b12a661f9dbdb305 (diff)
downloadblackbird-obmc-uboot-aa997d1d774416b3525d44779ee7ff9914b6abcb.tar.gz
blackbird-obmc-uboot-aa997d1d774416b3525d44779ee7ff9914b6abcb.zip
drivers/gpio/pm8916_gpio.c: Make pid be uint32_t
If get_dev_addr fails it will return FDT_ADDR_T_NONE and: >>> "priv->pid == 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: 143913) Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/pm8916_gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c
index 1abab7fef1..0b61975843 100644
--- a/drivers/gpio/pm8916_gpio.c
+++ b/drivers/gpio/pm8916_gpio.c
@@ -50,7 +50,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define REG_EN_CTL_ENABLE (1 << 7)
struct pm8916_gpio_bank {
- uint16_t pid; /* Peripheral ID on SPMI bus */
+ uint32_t pid; /* Peripheral ID on SPMI bus */
};
static int pm8916_gpio_set_direction(struct udevice *dev, unsigned offset,
OpenPOWER on IntegriCloud