musb: don't dereference NULL tusb_dma in dma_controller_destroy()
PATCH 1/1 musb: don't dereference NULL tusb_dma in dma_controller_destroy()
Test whether tusb_dma is not NULL before dereferencing
Signed-off-by Roel Kluin <[email protected]>
--- drivers/usb/musb/tusb6010_omap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/musb/tusb6010_omap.c +1 -1
@@ -648,7 +648,7 @@ void dma_controller_destroy(struct dma_controller *c) } } -if (!tusb_dma->multichannel && tusb_dma && tusb_dma->ch >=0 ) +if (tusb_dma && !tusb_dma->multichannel && tusb_dma->ch >=0 )omap_free_dma (tusb_dma->ch);kfree (tusb_dma);
Quoted 3 lines · ext Roel Kluin
Test whether
tusb_dmais not NULL before dereferencingSigned-off-by Roel Kluin <[email protected]>
Acked-by Felipe Balbi <[email protected]>
Signature · 1 line
balbi