Skip to content

Commit

Permalink
usb: musb: tusb: Fix possible null pointer dereference in tusb6010_om…
Browse files Browse the repository at this point in the history
…ap.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>
  • Loading branch information
Huzaifa Sidhpurwala authored and Felipe Balbi committed Mar 1, 2011
1 parent 70045c5 commit c88ba39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/musb/tusb6010_omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -721,6 +721,6 @@ dma_controller_create(struct musb *musb, void __iomem *base)

cleanup:
dma_controller_destroy(&tusb_dma->controller);

out:
return NULL;
}

0 comments on commit c88ba39

Please sign in to comment.