All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] pmic: tps65090: correct checking i2c bus
@ 2014-06-15 15:17 Jeroen Hofstee
  2014-06-18  3:59 ` Simon Glass
  2014-06-19 15:22 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Jeroen Hofstee @ 2014-06-15 15:17 UTC (permalink / raw)
  To: u-boot

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>
cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
 drivers/power/pmic/pmic_tps65090.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 	}
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] pmic: tps65090: correct checking i2c bus
  2014-06-15 15:17 [U-Boot] [PATCH] pmic: tps65090: correct checking i2c bus Jeroen Hofstee
@ 2014-06-18  3:59 ` Simon Glass
  2014-06-19 15:22 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2014-06-18  3:59 UTC (permalink / raw)
  To: u-boot

On 15 June 2014 08:17, Jeroen Hofstee <jeroen@myspectrum.nl> wrote:
> 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>
> cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

Acked-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] pmic: tps65090: correct checking i2c bus
  2014-06-15 15:17 [U-Boot] [PATCH] pmic: tps65090: correct checking i2c bus Jeroen Hofstee
  2014-06-18  3:59 ` Simon Glass
@ 2014-06-19 15:22 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2014-06-19 15:22 UTC (permalink / raw)
  To: u-boot

On Sun, Jun 15, 2014 at 05:17:04PM +0200, Jeroen Hofstee wrote:

> 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>
> cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140619/641f0da9/attachment.pgp>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-19 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-15 15:17 [U-Boot] [PATCH] pmic: tps65090: correct checking i2c bus Jeroen Hofstee
2014-06-18  3:59 ` Simon Glass
2014-06-19 15:22 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.