Message ID | 1372667978-4718-12-git-send-email-richard.genoud@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BEFF1BF4A1 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 1 Jul 2013 09:38:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA41620173 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 1 Jul 2013 09:38:51 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7922220178 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 1 Jul 2013 09:38:50 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UtZn2-0006U6-Sz; Mon, 01 Jul 2013 08:48:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UtZmO-0003eF-RS; Mon, 01 Jul 2013 08:48:12 +0000 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UtZmM-0003dU-4v for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2013 08:48:10 +0000 Received: by mail-wg0-f43.google.com with SMTP id z11so3478935wgg.10 for <linux-arm-kernel@lists.infradead.org>; Mon, 01 Jul 2013 01:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=K/J945zku+HoiyFZm4iEZa9rCssw03aBCUgitYgc9rg=; b=WiB5+sLcWYFfBrSPjlKVhSEvnxD35f/79Ul7YeIsH9fetYSlr24StnboUX9WVKLKrC G1IZJsV9H+RRGuFqYx7bUjBo1e7zcDcvC1zvLMyF2qi94e4M2sBjOXefcWD8WOHX3c45 sQRDFVpCpUWjkwg62vrLNgZ2bMG6C8Q9tv3FbQraddZqmyltLmrNzcGrv4C8NnYcFwD5 itfCln9Z+DNxRSE29sm0DVsQ6AsdLuyo3ZCSNFsBPuEPMDKuF3DqT+JGU3ibAHqHCTVC cZ5zZboXNw/siKdxpAFH7e//V+vsMslJ1Ev8TCN8FectBYSLrwbnWn+SopRabfM/lrnc AXJg== X-Received: by 10.180.77.231 with SMTP id v7mr1881264wiw.49.1372668018608; Mon, 01 Jul 2013 01:40:18 -0700 (PDT) Received: from lnx-rg.pr (lyon.paratronic.fr. [213.41.177.106]) by mx.google.com with ESMTPSA id h8sm14786574wie.1.2013.07.01.01.40.17 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Jul 2013 01:40:18 -0700 (PDT) From: Richard Genoud <richard.genoud@gmail.com> To: devicetree-discuss@lists.ozlabs.org Subject: [RFC PATCH 11/13] sound: atmel-pcm-dma: check pointer before dereference Date: Mon, 1 Jul 2013 10:39:36 +0200 Message-Id: <1372667978-4718-12-git-send-email-richard.genoud@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1372667978-4718-1-git-send-email-richard.genoud@gmail.com> References: <1372667978-4718-1-git-send-email-richard.genoud@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130701_044810_452329_CEC10A25 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: Richard Genoud <richard.genoud@gmail.com>, Nicolas Ferre <nicolas.ferre@atmel.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
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;
If platform_data is NULL, filter() is called with a NULL slave parameter. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> --- sound/soc/atmel/atmel-pcm-dma.c | 3 +++ 1 file changed, 3 insertions(+)