Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3548445pxm; Tue, 1 Mar 2022 00:01:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiSGYPsXF5+1cf8Ay0oIBau1+YKjcSONOfm75A2kVZBEaLnoqfNzjv3RIVbOoIvdGoblfE X-Received: by 2002:a05:6402:b37:b0:400:500f:f26 with SMTP id bo23-20020a0564020b3700b00400500f0f26mr22735824edb.301.1646121710630; Tue, 01 Mar 2022 00:01:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646121710; cv=none; d=google.com; s=arc-20160816; b=ChW5NLy96joIvz0n/TBjYxEP2Dc6t4qyjlnwQeM2zYQoQr1p0F62KdA1dbB//DAFcF +uUPtFxaMyY3H+Yz+P+Ijfa8w1ayIHxSnrkvkiuGbnVtHtdDp4goOb0pJJIglAgQhWrk yDLlgupRcDGc5jZpnVlXczMLKJ0dricdF7/rhsmut0Flvqtn2ZEoOB0SvNZCnC9VNjFI V2lo0bOfZPcIOA6vwcg9Zh7K4p6D9Kem7hsnKPmufIIUYzOhBllukOjZActreYNKGsPI XStRtycCqAJRquxN7c0GwEuIW6O6QiDHeWlWNVDF6NJLQllY7efMFltYp5CplSvnVrRj TGFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=tqbaRgACVCMhw6RoushURycP78gvmLnI/omUN6bWdh4=; b=ELEBaXzIkUEXaorahbAorAuYB1qWESqXmsD+fvKxBAPm4tlUA8W5/ohg02pMenMeyf 5xpD+yl7IBAiqUy3V9J4pNnu3ydWwVkdYqck+ILE32FfT7VXF8cHP1Bpwa/KjoYF8p5x V2Caafmtm7/t8ewnTaXzLxlME7iIVuait/RyUo9F2kMRsd7PVLS57qqN9eRUslL/GHMb e9xF+c38dyRRWO9h0jLoSsT0BrV8D4KTR7pq9Gpk5wAOzhVzd0MwG+gSflN0AAUtTOp5 MgpVrj5//V5fZXciDCpx9yRVcr2gNouJdCdTM3VF/JpinxL/zZWboFdPQrFuqPYQObE+ Yr1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d25-20020a50f699000000b00410a985ff20si8723601edn.33.2022.03.01.00.01.26; Tue, 01 Mar 2022 00:01:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232710AbiCAGuI (ORCPT + 99 others); Tue, 1 Mar 2022 01:50:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232697AbiCAGuG (ORCPT ); Tue, 1 Mar 2022 01:50:06 -0500 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF4AD50B37 for ; Mon, 28 Feb 2022 22:49:25 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0V5t7p1Q_1646117362; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V5t7p1Q_1646117362) by smtp.aliyun-inc.com(127.0.0.1); Tue, 01 Mar 2022 14:49:22 +0800 From: Yang Li To: broonie@kernel.org Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, tangmeng@uniontech.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] ASoC: amd: Fix an ignored error return from platform_get_irq_byname() Date: Tue, 1 Mar 2022 14:49:20 +0800 Message-Id: <20220301064920.37788-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The return from the call to platform_get_irq_byname() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'adata->i2s_irq', so assign the value to 'ret' concurrently to solve this problem without affecting other functions. Eliminate the following coccicheck warning: ./sound/soc/amd/acp/acp-renoir.c:286:5-19: WARNING: Unsigned expression compared with zero: adata -> i2s_irq < 0 Reported-by: Abaci Robot Fixes: 3304a242f45a ("ASoC: amd: Use platform_get_irq_byname() to get the interrupt") Signed-off-by: Yang Li --- sound/soc/amd/acp/acp-renoir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c index 738cf2e2b973..64e824161091 100644 --- a/sound/soc/amd/acp/acp-renoir.c +++ b/sound/soc/amd/acp/acp-renoir.c @@ -282,8 +282,8 @@ static int renoir_audio_probe(struct platform_device *pdev) if (!adata->acp_base) return -ENOMEM; - adata->i2s_irq = platform_get_irq_byname(pdev, "acp_dai_irq"); - if (adata->i2s_irq < 0) + adata->i2s_irq = ret = platform_get_irq_byname(pdev, "acp_dai_irq"); + if (ret < 0) return -ENODEV; adata->dev = dev; -- 2.20.1.7.g153144c