> -----Original Message----- > From: Felipe Balbi [mailto:me@xxxxxxxxxxxxxxx] > Sent: Tuesday, January 13, 2009 4:02 AM > To: Gupta, Ajay Kumar > Cc: linux-usb@xxxxxxxxxxxxxxx; linux-omap@xxxxxxxxxxxxxxx; david-b@xxxxxxxxxxx; > felipe.balbi@xxxxxxxxx > Subject: Re: [PATCH 3/3] usb: musb: fix null pointer check in musb_platform_init() > > On Wed, Jan 07, 2009 at 04:44:20PM +0530, Ajay Kumar Gupta wrote: > > 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@xxxxxx> > > Ajay, can you update this patch so we dev_err() the absence of a > transceiver driver ??? > > Thanks, besides that, you can put my s-o-b or ack Felipe, please check if the below one is fine. -Ajay > -- > balbi ========================== cut here ========================================= 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@xxxxxx> Acked-by: Felipe Balbi <felipe.balbi@xxxxxxxxx> --- drivers/usb/musb/omap2430.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 3f99536..93252c9 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -232,6 +232,10 @@ int __init musb_platform_init(struct musb *musb) #if defined(CONFIG_ARCH_OMAP2430) omap_cfg_reg(AE5_2430_USB0HS_STP); #endif + if (!x) { + pr_err("omap: musb: null transceiver found\n"); + return -ENODEV; + } musb->xceiv = *x; musb_platform_resume(musb); -- 1.5.6 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html