public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] usb: musb: fix null pointer check in musb_platform_init()
@ 2009-01-07 11:14 Ajay Kumar Gupta
       [not found] ` <1231326860-22727-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Ajay Kumar Gupta @ 2009-01-07 11:14 UTC (permalink / raw)
  To: linux-usb; +Cc: linux-omap, david-b, felipe.balbi, Ajay Kumar Gupta

Fixes kernel panic when musb is selected for OMAP35x EVM but twl4030 is not
selected as in this case otg_get_transceiver() returns null.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
---
 drivers/usb/musb/omap2430.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 3f99536..6ddc986 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -232,6 +232,8 @@ int __init musb_platform_init(struct musb *musb)
 #if defined(CONFIG_ARCH_OMAP2430)
 	omap_cfg_reg(AE5_2430_USB0HS_STP);
 #endif
+	if (!x)
+		return -ENODEV;
 
 	musb->xceiv = *x;
 	musb_platform_resume(musb);
-- 
1.5.6


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

end of thread, other threads:[~2009-01-23 10:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 11:14 [PATCH 3/3] usb: musb: fix null pointer check in musb_platform_init() Ajay Kumar Gupta
     [not found] ` <1231326860-22727-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2009-01-12 22:31   ` Felipe Balbi
2009-01-13  6:47     ` Gupta, Ajay Kumar
2009-01-23 10:16       ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox