From: Jeroen Hofstee Date: Sun, 15 Jun 2014 15:17:04 +0000 (+0200) Subject: pmic: tps65090: correct checking i2c bus X-Git-Tag: v2014.07-rc4~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a348d56934d6b0de31d5bdc12911a63e186e8ffa;p=u-boot pmic: tps65090: correct checking i2c bus The function tps65090_init checks the i2c bus of p->bus. However the pointer p is not intialiased at this point. Check the local variable bus instead. cc: Tom Wai-Hong Tam Signed-off-by: Jeroen Hofstee Acked-by: Simon Glass --- diff --git a/drivers/power/pmic/pmic_tps65090.c b/drivers/power/pmic/pmic_tps65090.c index c5b396610a..337903acec 100644 --- a/drivers/power/pmic/pmic_tps65090.c +++ b/drivers/power/pmic/pmic_tps65090.c @@ -285,7 +285,7 @@ int tps65090_init(void) } bus = i2c_get_bus_num_fdt(parent); - if (p->bus < 0) { + if (bus < 0) { debug("%s: Cannot find I2C bus\n", __func__); return -ENOENT; }