Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2559279rdh; Mon, 30 Oct 2023 00:09:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGN9KLjSFWfEJJlRZWG3Z+VXsgln7WxGr+0jsDBDvvIu/9CyggndpyWkH8TSa2Oi3ZU3L03 X-Received: by 2002:a17:902:e54a:b0:1cc:3e23:aa60 with SMTP id n10-20020a170902e54a00b001cc3e23aa60mr2297602plf.56.1698649756244; Mon, 30 Oct 2023 00:09:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698649756; cv=none; d=google.com; s=arc-20160816; b=rVItbbtJKgIu7U2gHQiqSkIl+6Rzkfa4JWBQPhRakGqVfwGaFfhOOF2N26PMXaVWc/ qju+qwMQZMXTkQxou6lZp4zlpc6rstUPOoSqHzGfvOHvfJKqLrKWzZVUdv/ZeVVgZfUu MFk+WZoa+lMh6WWONPvE8QA3OyzQbOt7UstWOUs9K05I3u2XMwp2OrcFEoaRakMFvyyI 8ZoiYBCooRNUNPQ1Jp6wgB5OL535j4nyAs9+WBvusWITU6RVlzW/6L2JwU7y52u5zYHg ecNk+Qnrs0UqOM4V8HU3Od32wQkhWhBhULXr6izOHMU2tT3i1E+kzDRV0KyzewCpPP3y 1OOg== 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:dkim-signature; bh=aIxu7yh5wYJuZc53Lt9scwP9Vbcx6BNPRaxSyYFe7Jw=; fh=elgNVygwWZNZ17eEThhNLQl1sk1MNEg5XOq34Z0yYUk=; b=WpEyXnrO9VCMSEz9JMJTvRjKEko8ykGKAB8PD/Dsdpn56LTxffcPYbmOOesNXXcWDD tQQG/EfrEsAUfksNQ3UEx+/FFU5/onSd5SVHVLtkZmYfeeR4+9OtVaqeziKSsKFXhJ42 6di7npGvmNYGJUnnksTAW18Tf7HznhEVtSYvNVilIpZh5Iya8Lf0rxPJ+m60hUAf9mHN NLWf404Q/HTHLX7F+YHGS5y01MplCB3oGWo07E1pKXw2HCsZpoACx/eQaU21GxRkitNV 9Gi3f5t14H+QOqwQcGXhdpqsAsiiouzCV7zmTFNxhykVf3bSJggQkCqpuXoWE3Jmqf2G ydpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="mfaMaHN/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id m14-20020a170902f64e00b001b81a112f9bsi4728705plg.586.2023.10.30.00.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 00:09:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="mfaMaHN/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BFE7F80620B9; Mon, 30 Oct 2023 00:09:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231614AbjJ3HJH (ORCPT + 99 others); Mon, 30 Oct 2023 03:09:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjJ3HJG (ORCPT ); Mon, 30 Oct 2023 03:09:06 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADF64BD; Mon, 30 Oct 2023 00:09:03 -0700 (PDT) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39U3ee5e010986; Mon, 30 Oct 2023 07:08:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2023-03-30; bh=aIxu7yh5wYJuZc53Lt9scwP9Vbcx6BNPRaxSyYFe7Jw=; b=mfaMaHN/z/yI+4q9NdIbisvzvXWPd+stfg1t+PKV3kaFfyEj5FShwbjY/twn8c5LFZ7h JJtPriCzO/tIa2j9ls7wlK/842S69B+zoo3komTP0gItpumrnxvu7IZpC9ozMQwHPOb1 TWVB1/64pnDgXZvEEI9ZJ2dtvi0v8P9nzBOTrnhsPYHEbtdZI4K41NU3UqZsqys8LxuG nrgJyCnPzFvhKhWUZbpkLyrKgu7qFqHefjO3WVMoCJyr5GMwCYfR4LSbFigYDeSAnLAW jt2NGTpiR3eOQRqxZyth4Gz9J4MFnx6R1ExPj5pL7eaAzekRy+Rlwevdq3p4sY86V5gv DQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u0s7bt2jk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Oct 2023 07:08:42 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 39U6hbXV030752; Mon, 30 Oct 2023 07:08:40 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u0rra4qt0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Oct 2023 07:08:40 +0000 Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 39U78eAF024650; Mon, 30 Oct 2023 07:08:40 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.129.136.47]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3u0rra4qrs-1; Mon, 30 Oct 2023 07:08:40 +0000 From: Harshit Mogalapalli To: James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai , Stefan Binding , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org Cc: dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org, error27@gmail.com, harshit.m.mogalapalli@oracle.com Subject: [PATCH next] ALSA: hda: cs35l41: Fix missing error code in cs35l41_smart_amp() Date: Mon, 30 Oct 2023 00:08:36 -0700 Message-ID: <20231030070836.3234385-1-harshit.m.mogalapalli@oracle.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-30_05,2023-10-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 spamscore=0 phishscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2310300052 X-Proofpoint-GUID: bc-zOkdmnKuRWRdTO1gCctbjFzAf-h0D X-Proofpoint-ORIG-GUID: bc-zOkdmnKuRWRdTO1gCctbjFzAf-h0D X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 30 Oct 2023 00:09:14 -0700 (PDT) When firmware status is invalid, assign -EINVAL to ret as ret is '0' at that point and returning success is incorrect when firmware status is invalid. Fixes: a51d8ba03a4f ("ALSA: hda: cs35l41: Check CSPL state after loading firmware") Signed-off-by: Harshit Mogalapalli --- This is found using smatch and only compile tested. --- sound/pci/hda/cs35l41_hda.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index 496ff6a9d300..09f8d8fa4c71 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -1042,6 +1042,7 @@ static int cs35l41_smart_amp(struct cs35l41_hda *cs35l41) default: dev_err(cs35l41->dev, "Firmware status is invalid: %u\n", fw_status); + ret = -EINVAL; goto clean_dsp; } -- 2.39.3