Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}