mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-20 22:21:41 +00:00
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>
This commit is contained in:
parent
1f9ce3063c
commit
a348d56934
1 changed files with 1 additions and 1 deletions
|
@ -285,7 +285,7 @@ int tps65090_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
bus = i2c_get_bus_num_fdt(parent);
|
bus = i2c_get_bus_num_fdt(parent);
|
||||||
if (p->bus < 0) {
|
if (bus < 0) {
|
||||||
debug("%s: Cannot find I2C bus\n", __func__);
|
debug("%s: Cannot find I2C bus\n", __func__);
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue