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 <huzaifas@redhat.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Huzaifa Sidhpurwala 2011-03-01 15:54:22 +05:30 committed by Felipe Balbi
parent 70045c57f3
commit c88ba39c1e

View File

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