Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1027366imi; Fri, 1 Jul 2022 01:10:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tdhmCOxD1zSs8zIkhb9rlbRuc9eIPLaTruTOg5GpGltt6U28K64chV5vlPhAw0tU1+lGbk X-Received: by 2002:a17:906:39d1:b0:6fa:8e62:c8a2 with SMTP id i17-20020a17090639d100b006fa8e62c8a2mr13239592eje.487.1656663058459; Fri, 01 Jul 2022 01:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656663058; cv=none; d=google.com; s=arc-20160816; b=kLGTojYLMHl0Q7gU4ul9+fVTUCfbDFglWwBfyLL/iuaSmENUaMlsaQEs5rWs4YOICm 6jL3867xyDNOAnOFKdnyr+uqDQscgOZ8QSYlM8Lns9N33EtCFfdbyu1QMRKP3M1MQupE 57qA5J4se1cg+ciba+TfmK4i61hK8cXZOFZ3X4uBrw8HuL39MIwswiXm40DU6epZh+ev 29nFoqPwJi096xMa79rGB6BUU+TKRhB3d5pzdISi3Twe2F0Tn0XDSZ2Ep4kbZ+bVXFL7 Yc7DlyatlZT//ihE2R4VIkzUeLpJQzErIaCjQLSfqhlybCGYtFFzvDPUZlRi9p8fxpxd 9ASg== 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=9z5eXai/AN1QH//h6Oy5ASb9an1+CaM70wr1O9E0JP4=; b=tnimwYGQgNqhatdUEON5UiHC66rY5hjV57Gb4z4taUdfT6CbR+9F0zLRIzBGsVb6Cb rtrTG1ngpIorQWSxc2OQLp37FgFbuNv55DHuXH1i2tFDLo4tNHOVFXU39PNyMj0hgVgv uQqKc9S/8WPwfSRgJLi/70OdkzDDgQYDPEXjc9m/GAinjbmPy6xUHDOBTDYGqPIYMo9a nRkOr254OK6EB4eiRNHAougHRG7UaQ/R5OaPr2+bkf8njWc9IFkRE/A6Ul2/BZ/fgHfR UWmqdg2AcDYOIqUZUT1I+BigbdX2al9kp0EsoadJQwmyUBdE/rqH8+7i4191YnXcAAMS 31cQ== 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 gn9-20020a1709070d0900b00722e89ba02bsi425031ejc.736.2022.07.01.01.10.33; Fri, 01 Jul 2022 01:10:58 -0700 (PDT) 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 S233360AbiGAH3J (ORCPT + 99 others); Fri, 1 Jul 2022 03:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231313AbiGAH3I (ORCPT ); Fri, 1 Jul 2022 03:29:08 -0400 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFD2D6B828; Fri, 1 Jul 2022 00:29:06 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VHzzt3O_1656660532; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VHzzt3O_1656660532) by smtp.aliyun-inc.com; Fri, 01 Jul 2022 15:29:04 +0800 From: Jiapeng Chong To: lgirdwood@gmail.com Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com, thierry.reding@gmail.com, jonathanh@nvidia.com, p.zabel@pengutronix.de, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] ASoC: tegra20_ac97: Fix missing error code in tegra20_ac97_platform_probe() Date: Fri, 1 Jul 2022 15:28:50 +0800 Message-Id: <20220701072850.62408-1-jiapeng.chong@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 error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. This was found by coccicheck: sound/soc/tegra/tegra20_ac97.c:357 tegra20_ac97_platform_probe() warn: missing error code 'ret'. Signed-off-by: Jiapeng Chong --- sound/soc/tegra/tegra20_ac97.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index e17375c6cddb..87facfbcdd11 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -354,6 +354,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) } } else { dev_err(&pdev->dev, "no codec-reset GPIO supplied\n"); + ret = -EINVAL; goto err_clk_put; } @@ -361,6 +362,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) "nvidia,codec-sync-gpio", 0); if (!gpio_is_valid(ac97->sync_gpio)) { dev_err(&pdev->dev, "no codec-sync GPIO supplied\n"); + ret = -EINVAL; goto err_clk_put; } -- 2.20.1.7.g153144c