forked from luck/tmp_suning_uos_patched
USB: 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 <roel.kluin@gmail.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
f7410ced7f
commit
94089d56e4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user