Commit c88ba39c authored by Huzaifa Sidhpurwala's avatar Huzaifa Sidhpurwala Committed by Felipe Balbi

usb: musb: tusb: Fix possible null pointer dereference in tusb6010_omap.c

tusb_dma was being dereferenced when it was nul
Signed-off-by: default avatarHuzaifa Sidhpurwala <huzaifas@redhat.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 70045c57
......@@ -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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment