* [PATCH] musb: don't dereference NULL tusb_dma in dma_controller_destroy()
@ 2010-01-09 20:57 Roel Kluin
2010-01-29 10:40 ` Felipe Balbi
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2010-01-09 20:57 UTC (permalink / raw)
To: Felipe Balbi, linux-usb, Andrew Morton, LKML
Test whether tusb_dma is not NULL before dereferencing
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
drivers/usb/musb/tusb6010_omap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c
index e13c770..1c86809 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-29 10:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-09 20:57 [PATCH] musb: don't dereference NULL tusb_dma in dma_controller_destroy() Roel Kluin
2010-01-29 10:40 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox