From: Huzaifa Sidhpurwala Date: Tue, 1 Mar 2011 10:24:22 +0000 (+0530) Subject: usb: musb: tusb: Fix possible null pointer dereference in tusb6010_omap.c X-Git-Tag: MMI-PSA29.97-13-9~20524^2~74 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c88ba39c1ea6a1591b6842199069ff50748d2073;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git usb: musb: tusb: Fix possible null pointer dereference in tusb6010_omap.c tusb_dma was being dereferenced when it was nul Signed-off-by: Huzaifa Sidhpurwala Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index c061a88f2b0f..99cb541e4ef0 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c @@ -680,7 +680,7 @@ dma_controller_create(struct musb *musb, void __iomem *base) tusb_dma = kzalloc(sizeof(struct tusb_omap_dma), GFP_KERNEL); if (!tusb_dma) - goto cleanup; + goto out; tusb_dma->musb = musb; tusb_dma->tbase = musb->ctrl_base; @@ -721,6 +721,6 @@ dma_controller_create(struct musb *musb, void __iomem *base) cleanup: dma_controller_destroy(&tusb_dma->controller); - +out: return NULL; }