Message ID | 20231030070836.3234385-1-harshit.m.mogalapalli@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp2028998vqb; Mon, 30 Oct 2023 00:09:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmGPZc+puvatgN6RZONCc5y/Moe6lfFBbvvseOkTx47g/DS9xm3GZ8XypOzT0d9u8DnPHO X-Received: by 2002:a17:90a:ad91:b0:27d:b9d:bd6f with SMTP id s17-20020a17090aad9100b0027d0b9dbd6fmr6101616pjq.45.1698649765373; Mon, 30 Oct 2023 00:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698649765; cv=none; d=google.com; s=arc-20160816; b=uvw1ExjcdY/fQzF6gAgvW8Pxm09fhZnfCkrJyPNSobbepYX7l6X6TDEmzkAZ/pjrbd sMP274JhG6AmixkttSs6XQ6z+z6kWf6hqlr7cfyB7Sp6g/U6FcM+JPbVO3dMDFUfpIO+ ZC10Jz3qR4aN6GCOGd+3NjUNYpCUHPHes2eL2Mi7rzbB2ssBNeLOoVeq40T3SxTV4Hb6 Ovdx9IBZTlOKS3YQcUt7mYlCyXhcqgK1pDZqB3+xXbLAgLsMf9EFhuOsTQ9D6k5Uxs/c SHCUchCmUwpzzYDb2q+pgidwQi2GrT1YN9pjBjqq9aWMAdjuRE8uxLmNVOpAd582x6UL 38ZQ== 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 Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id kk13-20020a17090b4a0d00b00277387bc11dsi2278272pjb.188.2023.10.30.00.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 00:09:25 -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 E133680620B7; Mon, 30 Oct 2023 00:09:22 -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 S231615AbjJ3HJH (ORCPT <rfc822;chrisjones.unixmen@gmail.com> + 32 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <harshit.m.mogalapalli@oracle.com> To: James Schulman <james.schulman@cirrus.com>, David Rhodes <david.rhodes@cirrus.com>, Richard Fitzgerald <rf@opensource.cirrus.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Stefan Binding <sbinding@opensource.cirrus.com>, 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: <linux-kernel.vger.kernel.org> 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:23 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781163376051615431 X-GMAIL-MSGID: 1781163376051615431 |
Series |
[next] ALSA: hda: cs35l41: Fix missing error code in cs35l41_smart_amp()
|
|
Commit Message
Harshit Mogalapalli
Oct. 30, 2023, 7:08 a.m. UTC
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 <harshit.m.mogalapalli@oracle.com>
---
This is found using smatch and only compile tested.
---
sound/pci/hda/cs35l41_hda.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Mon, 30 Oct 2023 08:08:36 +0100, Harshit Mogalapalli wrote: > > 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 <harshit.m.mogalapalli@oracle.com> Thanks, applied now. Takashi > --- > 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 >
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; }