From nobody Wed Feb 11 20:03:04 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BD13C77B70 for ; Tue, 11 Apr 2023 17:11:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229604AbjDKRLQ (ORCPT ); Tue, 11 Apr 2023 13:11:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229884AbjDKRLL (ORCPT ); Tue, 11 Apr 2023 13:11:11 -0400 Received: from hust.edu.cn (mail.hust.edu.cn [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D97F449C for ; Tue, 11 Apr 2023 10:11:00 -0700 (PDT) Received: from localhost.localdomain ([172.16.0.254]) (user=lyre@hust.edu.cn mech=LOGIN bits=0) by mx1.hust.edu.cn with ESMTP id 33BH9DX4005030-33BH9DX5005030 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 12 Apr 2023 01:09:30 +0800 From: Ying Liu To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: HUST OS Kernel Contribution , Ying Liu , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: tas5720: add missing unwind goto in tas5720_codec_probe Date: Wed, 12 Apr 2023 01:09:12 +0800 Message-Id: <20230411170912.1939906-1-lyre@hust.edu.cn> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FEAS-AUTH-USER: lyre@hust.edu.cn Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Smatch complains that missing unwind goto in tas5720_codec_probe. When tas5720 has an invalid devtype, it is expected to invoke regulator_bulk_disable to handle the failure. But the default option return an error code directly. Fix it by reusing the probe_fail label. Signed-off-by: Ying Liu --- The issue is found by static analysis and the patch remains untested. --- sound/soc/codecs/tas5720.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c index de6d01c8fdd3..4d27b60bd804 100644 --- a/sound/soc/codecs/tas5720.c +++ b/sound/soc/codecs/tas5720.c @@ -339,7 +339,8 @@ static int tas5720_codec_probe(struct snd_soc_component= *component) break; default: dev_err(component->dev, "unexpected private driver data\n"); - return -EINVAL; + ret =3D -EINVAL; + goto probe_fail; } =20 if (device_id !=3D expected_device_id) --=20 2.40.0