[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1372667978-4718-12-git-send-email-richard.genoud@gmail.com>
Date: Mon, 1 Jul 2013 10:39:36 +0200
From: Richard Genoud <richard.genoud@...il.com>
To: devicetree-discuss@...ts.ozlabs.org
Cc: linux-arm-kernel@...ts.infradead.org,
Nicolas Ferre <nicolas.ferre@...el.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, linux-kernel@...r.kernel.org,
Richard Genoud <richard.genoud@...il.com>
Subject: [RFC PATCH 11/13] sound: atmel-pcm-dma: check pointer before dereference
If platform_data is NULL, filter() is called with a NULL slave
parameter.
Signed-off-by: Richard Genoud <richard.genoud@...il.com>
---
sound/soc/atmel/atmel-pcm-dma.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
index 1d38fd0..b20dbba 100644
--- a/sound/soc/atmel/atmel-pcm-dma.c
+++ b/sound/soc/atmel/atmel-pcm-dma.c
@@ -96,6 +96,9 @@ static bool filter(struct dma_chan *chan, void *slave)
{
struct at_dma_slave *sl = slave;
+ if (!sl)
+ return false;
+
if (sl->dma_dev == chan->device->dev) {
chan->private = sl;
return true;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists