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,UNPARSEABLE_RELAY,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 6293EC352A4 for ; Mon, 10 Feb 2020 08:51: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 DFCD020733 for ; Mon, 10 Feb 2020 08:51:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="YtCL3FhW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="hOS8eLGJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFCD020733 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.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 18655844; Mon, 10 Feb 2020 09:50:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 18655844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1581324664; bh=LZ8uFfVLGPdAYYLNH3V/YfU3GIYAKhCY6rHlxbpDBEA=; h=Date:From:To:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YtCL3FhWbYccaNlt6gCg60quysvVG20sNaE93ea3zr4hiIp5Fx6XZF4vmbblfhRVo LjkcWQaLsgwSXGChWkOzC8X24SFiHmwIsLufQn+MGaNm6lT08COIH4XjPgUAPifQ5Q 0ELkwXGwbZ2uUuv1on5/SaSuf3TdaS4egFhNCKN0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 982F4F8014F; Mon, 10 Feb 2020 09:50:13 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 46933F80157; Mon, 10 Feb 2020 09:50:12 +0100 (CET) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) (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 555BAF80118 for ; Mon, 10 Feb 2020 09:50:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 555BAF80118 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="hOS8eLGJ" Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01A8mFd7028710; Mon, 10 Feb 2020 08:50:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=vEZnDveUj8OeSkV53Xrm676LVu2Y2vr8d6WdzvPvr/U=; b=hOS8eLGJj19RP4GWP28UNG3EEcKI0KSmuBo7nYMmefFb6/uxO8MphaH9KJWAebyIVnEN JwfPzPxqI+nW4zKn9qeWZveCx/E/UNE7vbQqlcvbeLhNi/bp6e1OGu6TZDnYJQVuEOa/ OpOIbGpFXx7F1e7FH/XmFoUqRKn70y28S+AVYBeah0b/9yvCkQ/Unk68SYLQ6+Qud5ua /KdNHAb1RmpfQnUjetEmEsCQT7UBzRfHAkFUwl2Pijo9rjTqMO3UBcNtV4mvWXAqH5vz A6icY/QcDAJQckY4NDx1eI9j4pKZvCqcSPRsp6K3sllXZGqBctA3X5ArwIvHGEWj63tD jg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2y2k87tgt1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Feb 2020 08:50:06 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01A8m4U2121050; Mon, 10 Feb 2020 08:50:06 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 2y26hsj31f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Feb 2020 08:50:06 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 01A8o55V012776; Mon, 10 Feb 2020 08:50:05 GMT Received: from kadam (/129.205.23.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Feb 2020 00:50:04 -0800 Date: Mon, 10 Feb 2020 11:49:55 +0300 From: Dan Carpenter To: Colin King , Vinod Koul Message-ID: <20200210084955.GY1778@kadam> References: <20200208220720.36657-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200208220720.36657-1-colin.king@canonical.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9526 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002100073 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9526 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 impostorscore=0 clxscore=1011 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002100073 Cc: Cezary Rojewski , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, Takashi Iwai , Jie Yang , Pierre-Louis Bossart , Liam Girdwood , Mark Brown , "Subhransu S . Prusty" , 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Sat, Feb 08, 2020 at 10:07:20PM +0000, 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 > --- > 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); It's weird that we release the regions on the success path. regards, dan carpenter > - return 0; > + return ret; > } _______________________________________________ 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 From: Dan Carpenter Date: Mon, 10 Feb 2020 08:49:55 +0000 Subject: Re: [PATCH] ASoC: Intel: mrfld: return error codes when an error occurs Message-Id: <20200210084955.GY1778@kadam> 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 , Vinod Koul Cc: Cezary Rojewski , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, Takashi Iwai , Jie Yang , Pierre-Louis Bossart , Liam Girdwood , Mark Brown , "Subhransu S . Prusty" , linux-kernel@vger.kernel.org On Sat, Feb 08, 2020 at 10:07:20PM +0000, 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 > --- > 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); It's weird that we release the regions on the success path. regards, dan carpenter > - 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.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, 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 37328C352A4 for ; Mon, 10 Feb 2020 08:50:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DE08214DB for ; Mon, 10 Feb 2020 08:50:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="hOS8eLGJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727597AbgBJIu4 (ORCPT ); Mon, 10 Feb 2020 03:50:56 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:33512 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbgBJIu4 (ORCPT ); Mon, 10 Feb 2020 03:50:56 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01A8mFd7028710; Mon, 10 Feb 2020 08:50:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=vEZnDveUj8OeSkV53Xrm676LVu2Y2vr8d6WdzvPvr/U=; b=hOS8eLGJj19RP4GWP28UNG3EEcKI0KSmuBo7nYMmefFb6/uxO8MphaH9KJWAebyIVnEN JwfPzPxqI+nW4zKn9qeWZveCx/E/UNE7vbQqlcvbeLhNi/bp6e1OGu6TZDnYJQVuEOa/ OpOIbGpFXx7F1e7FH/XmFoUqRKn70y28S+AVYBeah0b/9yvCkQ/Unk68SYLQ6+Qud5ua /KdNHAb1RmpfQnUjetEmEsCQT7UBzRfHAkFUwl2Pijo9rjTqMO3UBcNtV4mvWXAqH5vz A6icY/QcDAJQckY4NDx1eI9j4pKZvCqcSPRsp6K3sllXZGqBctA3X5ArwIvHGEWj63tD jg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2y2k87tgt1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Feb 2020 08:50:06 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01A8m4U2121050; Mon, 10 Feb 2020 08:50:06 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 2y26hsj31f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Feb 2020 08:50:06 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 01A8o55V012776; Mon, 10 Feb 2020 08:50:05 GMT Received: from kadam (/129.205.23.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Feb 2020 00:50:04 -0800 Date: Mon, 10 Feb 2020 11:49:55 +0300 From: Dan Carpenter To: Colin King , Vinod Koul Cc: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Jie Yang , Mark Brown , Jaroslav Kysela , Takashi Iwai , "Subhransu S . Prusty" , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: Intel: mrfld: return error codes when an error occurs Message-ID: <20200210084955.GY1778@kadam> References: <20200208220720.36657-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200208220720.36657-1-colin.king@canonical.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9526 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002100073 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9526 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 impostorscore=0 clxscore=1011 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002100073 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 08, 2020 at 10:07:20PM +0000, 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 > --- > 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); It's weird that we release the regions on the success path. regards, dan carpenter > - return 0; > + return ret; > }