提交 c88ba39c 编写于 作者: H Huzaifa Sidhpurwala 提交者: 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: NHuzaifa Sidhpurwala <huzaifas@redhat.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 70045c57
...@@ -680,7 +680,7 @@ dma_controller_create(struct musb *musb, void __iomem *base) ...@@ -680,7 +680,7 @@ dma_controller_create(struct musb *musb, void __iomem *base)
tusb_dma = kzalloc(sizeof(struct tusb_omap_dma), GFP_KERNEL); tusb_dma = kzalloc(sizeof(struct tusb_omap_dma), GFP_KERNEL);
if (!tusb_dma) if (!tusb_dma)
goto cleanup; goto out;
tusb_dma->musb = musb; tusb_dma->musb = musb;
tusb_dma->tbase = musb->ctrl_base; tusb_dma->tbase = musb->ctrl_base;
...@@ -721,6 +721,6 @@ dma_controller_create(struct musb *musb, void __iomem *base) ...@@ -721,6 +721,6 @@ dma_controller_create(struct musb *musb, void __iomem *base)
cleanup: cleanup:
dma_controller_destroy(&tusb_dma->controller); dma_controller_destroy(&tusb_dma->controller);
out:
return NULL; return NULL;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册