Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3803191ybv; Mon, 10 Feb 2020 06:42:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxaSSNMT5SLfKrf421lCEJu1YHbHHcwwfRYkteWdtAxZkXHnLHE9AvixDLEvXs1dXkWCLLC X-Received: by 2002:a05:6830:2102:: with SMTP id i2mr1280562otc.123.1581345742008; Mon, 10 Feb 2020 06:42:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581345741; cv=none; d=google.com; s=arc-20160816; b=GxGg8NT5YMP4ykNZDNKOD084iQFe6x9krlhiCiOB/gaduL3HNtyMCncxd8I0sRziE3 FWIK1m941S0V/4hHj+JhGTDL2Oq/Nb6XBOiSCD1x+Z51yJVlUEyBEqwXCOSvpyV+QM+f GyxOm4U2m70omric7F2qG1F9esCSqIliWVOYV0fQjL2qdjlKHUMa2kIF9sigvqi/AfK2 bTWG704h4ztrc9yQeaXdzJ4b8NrlKgh4tSaj7AHX9YcfmRoouqarr1CAoUhwWWFbccdR b9fTHVEA+Cb5Io2WmhGJxvOe6p3B9jRRiiFATBpiseOY58fFQDCr/89zLZk9YeCc00/W fELw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=6E5lQm9P/CMIVTwVlFrSZJSd9kh6hHbu50gnKxHVSH8=; b=hh0Tt69WQqCVwoxDez/71RC/cwnCh4n+J5sQRI3LpQ9kRUBSA9Bbw6hXnwdYABTTTH 1Jm25rNx6xLR5iKDQovmT53JXDWBlQZ34eFzJ5cfIHYEcNQNGF6/XTZ+GCE21Q26P+8I J6irZ5gabV9uU6wV+s5xrC0aW7WntTmTUFbi01lTPmQKO9dvFfCnDbj+VMXgM06OYVqd IEqXZNjW0YJMuZSC5VQpXGoR5Mc2hdqSFeNvUtGw+5L/eQdSA8PBpgzaJZWuho8qU85X WzY/gxTzpK4OySpa/QgSFnCxAUuEYnKWgcJsxtwRN+jNzCa8aUjB1rFC5+TwuwhEw7y/ 97Zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i78si272649oib.1.2020.02.10.06.42.09; Mon, 10 Feb 2020 06:42:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727877AbgBJOmE (ORCPT + 99 others); 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; > } > > /* >