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=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 68406C43603 for ; Wed, 4 Dec 2019 20:00:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AAB92073B for ; Wed, 4 Dec 2019 20:00:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728064AbfLDUA6 (ORCPT ); Wed, 4 Dec 2019 15:00:58 -0500 Received: from mga18.intel.com ([134.134.136.126]:9779 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727033AbfLDUA5 (ORCPT ); Wed, 4 Dec 2019 15:00:57 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2019 12:00:56 -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 Subject: Re: [alsa-devel] [PATCH] ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev 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 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.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-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre-Louis Bossart Date: Wed, 04 Dec 2019 19:13:45 +0000 Subject: Re: [alsa-devel] [PATCH] ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev Message-Id: <33fec540-e97b-25e7-83af-575f19d829d2@linux.intel.com> List-Id: References: <20191204124816.1415359-1-colin.king@canonical.com> In-Reply-To: <20191204124816.1415359-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org 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, > 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 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.3 required=3.0 tests=DKIMWL_WL_HIGH,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 F20A6C43603 for ; Wed, 4 Dec 2019 20:01:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C1FAC2073B for ; Wed, 4 Dec 2019 20:01:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nkfUAZUS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1FAC2073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=imwb/sYrnv8gw/dOMOBnJ/CwBfL5MzSAuMla/A8MQas=; b=nkfUAZUSC7k6xg63/dkflwcs/ GH+/o9ih7mpB/Is7IT7MVVSwI9GnPR5YAeopzrFaS6AqnbZgDSx7/RiB1lpyc2nc/oSEmFOCZOIy9 iCKVaCaIIHye5hC8ceD5ssps9LwFwf11ojDkmzu9ZnxQ9ONnyi0BYACo/kVDCvfIgOw7GmcTSGMsf r5HTBbPNBTTHCvLfLN7rZiWDKTUyIbEc+EPhI28iCmS1JWUlYAGD/di80/D2T4kBVQsRczvbsmwRI m6FnEiG371GBP84jEgF/9p9J7dXzVrFbqwazqQLTXrJ/Nw9XOPIqiSRNYv2VKyAjHxWkKEScR5+cq 6igvAROmw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1icapY-0003iB-Fm; Wed, 04 Dec 2019 20:01:00 +0000 Received: from mga07.intel.com ([134.134.136.100]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1icapW-0003ha-2Y for linux-arm-kernel@lists.infradead.org; Wed, 04 Dec 2019 20:00:59 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2019 12:00:56 -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 Subject: Re: [alsa-devel] [PATCH] ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_120058_158410_15804B80 X-CRM114-Status: GOOD ( 17.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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, > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel