From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 536E3C43603 for ; Wed, 4 Dec 2019 20:02:06 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5D9332073B for ; Wed, 4 Dec 2019 20:02:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="ZLq3htiz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D9332073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 386521664; Wed, 4 Dec 2019 21:01:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 386521664 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1575489722; bh=KvvRrcZD/g0tiGiragpgJ/BHLQBF+t/7bcZjeG5ljwo=; h=To:References:From:Date:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZLq3htizL0ZJ+3KTB5kMZQ+VP41w/3qGNYWhPFr3rp+1ylaZmv0FCUHMmMFtxrb0Q be6e4kZ0LRRQM7ONmDKDx6RnO/m0DUfabfsnxL/+quf/jRh6uvMXRA1Kyhlih+HquG wtzGcVp0CCFqqQ6hZ+Vt5xh3ZAYg6gtq9eUB1wEo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C7790F801D9; Wed, 4 Dec 2019 21:01:11 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BD926F801EC; Wed, 4 Dec 2019 21:01:06 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 10243F800F0 for ; Wed, 4 Dec 2019 21:00:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 10243F800F0 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2019 12:00:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,278,1571727600"; d="scan'208";a="236407731" Received: from jcourage-mobl.amr.corp.intel.com (HELO [10.251.152.230]) ([10.251.152.230]) by fmsmga004.fm.intel.com with ESMTP; 04 Dec 2019 12:00:54 -0800 To: Colin King , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Daniel Baluta , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org References: <20191204124816.1415359-1-colin.king@canonical.com> From: Pierre-Louis Bossart Message-ID: <33fec540-e97b-25e7-83af-575f19d829d2@linux.intel.com> Date: Wed, 4 Dec 2019 13:13:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <20191204124816.1415359-1-colin.king@canonical.com> Content-Language: en-US Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [alsa-devel] [PATCH] ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 12/4/19 6:48 AM, Colin King wrote: > From: Colin Ian King > > The memory allocation failure check for priv->pd_dev is incorrectly > pointer checking priv instead of priv->pd_dev. Fix this. > > Addresses-Coverity: ("Logically dead code") > Fixes: 202acc565a1f ("ASoC: SOF: imx: Add i.MX8 HW support") > Signed-off-by: Colin Ian King Thanks Colin Acked-by: Pierre-Louis Bossart > --- > sound/soc/sof/imx/imx8.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c > index cfefcfd92798..9d926b1df0d7 100644 > --- a/sound/soc/sof/imx/imx8.c > +++ b/sound/soc/sof/imx/imx8.c > @@ -209,7 +209,7 @@ static int imx8_probe(struct snd_sof_dev *sdev) > > priv->pd_dev = devm_kmalloc_array(&pdev->dev, priv->num_domains, > sizeof(*priv->pd_dev), GFP_KERNEL); > - if (!priv) > + if (!priv->pd_dev) > return -ENOMEM; > > priv->link = devm_kmalloc_array(&pdev->dev, priv->num_domains, > _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel