summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/tusb6010_omap.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2010-01-09 21:57:44 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:54:14 -0800
commit94089d56e456d2814c379538919180957a254e4a (patch)
tree03e64466bbd6a647dd32c7ecaa0adeee5e89d95c /drivers/usb/musb/tusb6010_omap.c
parentf7410ced7f931bb1ad79d1336412cf7b7a33cb14 (diff)
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>
Diffstat (limited to 'drivers/usb/musb/tusb6010_omap.c')
-rw-r--r--drivers/usb/musb/tusb6010_omap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c
index e13c77052e5e..1c868096bd6f 100644
--- a/drivers/usb/musb/tusb6010_omap.c
+++ b/drivers/usb/musb/tusb6010_omap.c
@@ -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);