summaryrefslogtreecommitdiff
path: root/drivers/power/pmic/pmic_tps65090.c
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2014-06-15 17:17:04 +0200
committerTom Rini <trini@ti.com>2014-06-19 11:19:05 -0400
commita348d56934d6b0de31d5bdc12911a63e186e8ffa (patch)
tree857a4bba33a2a3f81efa5b2a2183f31932e8021c /drivers/power/pmic/pmic_tps65090.c
parent1f9ce3063cd723a1dcf0d02070f07c59491cf6f9 (diff)
downloadu-boot-imx-a348d56934d6b0de31d5bdc12911a63e186e8ffa.zip
u-boot-imx-a348d56934d6b0de31d5bdc12911a63e186e8ffa.tar.gz
u-boot-imx-a348d56934d6b0de31d5bdc12911a63e186e8ffa.tar.bz2
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 <waihong@chromium.org> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/power/pmic/pmic_tps65090.c')
-rw-r--r--drivers/power/pmic/pmic_tps65090.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/pmic/pmic_tps65090.c b/drivers/power/pmic/pmic_tps65090.c
index c5b3966..337903a 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;
}