提交 94089d56 编写于 作者: R Roel Kluin 提交者: Greg Kroah-Hartman

USB: musb: don't dereference NULL tusb_dma in dma_controller_destroy()

Test whether tusb_dma is not NULL before dereferencing
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f7410ced
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册