From patchwork Tue Nov 4 10:55:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 5225511 Return-Path: X-Original-To: patchwork-alsa-devel@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 F32ACC11AC for ; Tue, 4 Nov 2014 10:56:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 48522201FB for ; Tue, 4 Nov 2014 10:56:40 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 42C19201F2 for ; Tue, 4 Nov 2014 10:56:39 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 009E7260715; Tue, 4 Nov 2014 11:56:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id A073F2608BC; Tue, 4 Nov 2014 11:55:55 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0C821261171; Tue, 4 Nov 2014 11:55:55 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id B82972608BC for ; Tue, 4 Nov 2014 11:55:18 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 04 Nov 2014 02:55:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,312,1413270000"; d="scan'208";a="616736586" Received: from vkoul-udesk3.iind.intel.com (HELO localhost.localdomain) ([10.223.84.65]) by fmsmga001.fm.intel.com with ESMTP; 04 Nov 2014 02:54:40 -0800 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Tue, 4 Nov 2014 16:25:15 +0530 Message-Id: <1415098520-14113-2-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1415098520-14113-1-git-send-email-vinod.koul@intel.com> References: <1415098520-14113-1-git-send-email-vinod.koul@intel.com> Cc: tiwai@suse.de, Vinod Koul , broonie@kernel.org, subhransu.s.prusty@intel.com, lgirdwood@gmail.com Subject: [alsa-devel] [PATCH v3 1/6] ASoC: Intel: mrfld - remove unnecessary check for pointer X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP the 'platform' pointer in sst_map_modules_to_pipe() is deref in caller function so we need to check for it in this function Reported-by: Dan Carpenter Signed-off-by: Vinod Koul --- sound/soc/intel/sst-atom-controls.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sound/soc/intel/sst-atom-controls.c b/sound/soc/intel/sst-atom-controls.c index 309a8f3..90aa5c0 100644 --- a/sound/soc/intel/sst-atom-controls.c +++ b/sound/soc/intel/sst-atom-controls.c @@ -1351,7 +1351,7 @@ static int sst_map_modules_to_pipe(struct snd_soc_platform *platform) int ret = 0; list_for_each_entry(w, &platform->component.card->widgets, list) { - if (platform && is_sst_dapm_widget(w) && (w->priv)) { + if (is_sst_dapm_widget(w) && (w->priv)) { struct sst_ids *ids = w->priv; dev_dbg(platform->dev, "widget type=%d name=%s\n",