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=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 800A3C352A3 for ; Mon, 10 Feb 2020 14:42:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 605BE2082F for ; Mon, 10 Feb 2020 14:42:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727976AbgBJOmE (ORCPT ); Mon, 10 Feb 2020 09:42:04 -0500 Received: from mga03.intel.com ([134.134.136.65]:18244 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726961AbgBJOmE (ORCPT ); Mon, 10 Feb 2020 09:42:04 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2020 06:42:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,425,1574150400"; d="scan'208";a="226213708" Received: from ykatsuma-mobl1.gar.corp.intel.com (HELO [10.251.140.95]) ([10.251.140.95]) by fmsmga007.fm.intel.com with ESMTP; 10 Feb 2020 06:42:02 -0800 Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: mrfld: return error codes when an error occurs To: Colin King , Cezary Rojewski , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vinod Koul , "Subhransu S . Prusty" , alsa-devel@alsa-project.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200208220720.36657-1-colin.king@canonical.com> From: Pierre-Louis Bossart Message-ID: <96b4d153-2ee5-ea88-7176-a2d9ebf19982@linux.intel.com> Date: Mon, 10 Feb 2020 08:09:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200208220720.36657-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 2/8/20 4:07 PM, Colin King wrote: > From: Colin Ian King > > Currently function sst_platform_get_resources always returns zero and > error return codes set by the function are never returned. Fix this > by returning the error return code in variable ret rather than the > hard coded zero. > > Addresses-Coverity: ("Unused value") > Fixes: f533a035e4da ("ASoC: Intel: mrfld - create separate module for pci part") > Signed-off-by: Colin Ian King Yes, it's clearly bad. Acked-by: Pierre-Louis Bossart I don't think this impacts anyone though, the code can only be used for Merrifield/Tangier. > --- > sound/soc/intel/atom/sst/sst_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/intel/atom/sst/sst_pci.c b/sound/soc/intel/atom/sst/sst_pci.c > index d952719bc098..5862fe968083 100644 > --- a/sound/soc/intel/atom/sst/sst_pci.c > +++ b/sound/soc/intel/atom/sst/sst_pci.c > @@ -99,7 +99,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) > dev_dbg(ctx->dev, "DRAM Ptr %p\n", ctx->dram); > do_release_regions: > pci_release_regions(pci); > - return 0; > + return ret; > } > > /* > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre-Louis Bossart Date: Mon, 10 Feb 2020 14:09:26 +0000 Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: mrfld: return error codes when an error occurs Message-Id: <96b4d153-2ee5-ea88-7176-a2d9ebf19982@linux.intel.com> List-Id: References: <20200208220720.36657-1-colin.king@canonical.com> In-Reply-To: <20200208220720.36657-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Colin King , Cezary Rojewski , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vinod Koul , "Subhransu S . Prusty" , alsa-devel@alsa-project.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org On 2/8/20 4:07 PM, Colin King wrote: > From: Colin Ian King > > Currently function sst_platform_get_resources always returns zero and > error return codes set by the function are never returned. Fix this > by returning the error return code in variable ret rather than the > hard coded zero. > > Addresses-Coverity: ("Unused value") > Fixes: f533a035e4da ("ASoC: Intel: mrfld - create separate module for pci part") > Signed-off-by: Colin Ian King Yes, it's clearly bad. Acked-by: Pierre-Louis Bossart I don't think this impacts anyone though, the code can only be used for Merrifield/Tangier. > --- > sound/soc/intel/atom/sst/sst_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/intel/atom/sst/sst_pci.c b/sound/soc/intel/atom/sst/sst_pci.c > index d952719bc098..5862fe968083 100644 > --- a/sound/soc/intel/atom/sst/sst_pci.c > +++ b/sound/soc/intel/atom/sst/sst_pci.c > @@ -99,7 +99,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) > dev_dbg(ctx->dev, "DRAM Ptr %p\n", ctx->dram); > do_release_regions: > pci_release_regions(pci); > - return 0; > + return ret; > } > > /* > 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=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 1ABF6C352A3 for ; Mon, 10 Feb 2020 14:43:04 +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 9B08C20838 for ; Mon, 10 Feb 2020 14:43:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="TVmsTWEg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B08C20838 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 ED39E847; Mon, 10 Feb 2020 15:42:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ED39E847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1581345782; bh=0RfM2lL/orHkmtII3wD8I2CKMOJq2eEobSolMFF8xYU=; h=To:References:From:Date:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TVmsTWEgPeyhp2azPoSR06Db1bXndhtzquGGOqMq77241JwQ3vppiHkKF9Ixm9KNx FNqnwMKhMRG4eC0Hx2ACVQ4SW2dlfM+Z/NMo2CVF/06FY/RDc/hm50gRpdF98dhKVl lcTryeXJrI2ThuozgZcS2yJQylaS/cotjxrZN0BE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 47F68F80157; Mon, 10 Feb 2020 15:42:11 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 56303F800E7; Mon, 10 Feb 2020 15:42:09 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 006A7F800E7 for ; Mon, 10 Feb 2020 15:42:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 006A7F800E7 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2020 06:42:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,425,1574150400"; d="scan'208";a="226213708" Received: from ykatsuma-mobl1.gar.corp.intel.com (HELO [10.251.140.95]) ([10.251.140.95]) by fmsmga007.fm.intel.com with ESMTP; 10 Feb 2020 06:42:02 -0800 To: Colin King , Cezary Rojewski , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vinod Koul , "Subhransu S . Prusty" , alsa-devel@alsa-project.org References: <20200208220720.36657-1-colin.king@canonical.com> From: Pierre-Louis Bossart Message-ID: <96b4d153-2ee5-ea88-7176-a2d9ebf19982@linux.intel.com> Date: Mon, 10 Feb 2020 08:09:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200208220720.36657-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: Intel: mrfld: return error codes when an error occurs 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 2/8/20 4:07 PM, Colin King wrote: > From: Colin Ian King > > Currently function sst_platform_get_resources always returns zero and > error return codes set by the function are never returned. Fix this > by returning the error return code in variable ret rather than the > hard coded zero. > > Addresses-Coverity: ("Unused value") > Fixes: f533a035e4da ("ASoC: Intel: mrfld - create separate module for pci part") > Signed-off-by: Colin Ian King Yes, it's clearly bad. Acked-by: Pierre-Louis Bossart I don't think this impacts anyone though, the code can only be used for Merrifield/Tangier. > --- > sound/soc/intel/atom/sst/sst_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/intel/atom/sst/sst_pci.c b/sound/soc/intel/atom/sst/sst_pci.c > index d952719bc098..5862fe968083 100644 > --- a/sound/soc/intel/atom/sst/sst_pci.c > +++ b/sound/soc/intel/atom/sst/sst_pci.c > @@ -99,7 +99,7 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) > dev_dbg(ctx->dev, "DRAM Ptr %p\n", ctx->dram); > do_release_regions: > pci_release_regions(pci); > - return 0; > + return ret; > } > > /* > _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel