mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 21:52:04 +00:00
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:
parent
70045c57f3
commit
c88ba39c1e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user