Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp405249rdb; Tue, 31 Oct 2023 10:31:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvvZ4bAzTONXguSHLFN4sm7e+XecIZYqz1f9fP9gqb+UeAIkf9Q/liMFtMJdmpJxp8PBji X-Received: by 2002:a05:6a00:190b:b0:6be:20d5:e8f8 with SMTP id y11-20020a056a00190b00b006be20d5e8f8mr12290840pfi.1.1698773511681; Tue, 31 Oct 2023 10:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698773511; cv=none; d=google.com; s=arc-20160816; b=rP+ofFhXENuAUdKW6DatXQSLXqArB/A0zpUVSXL25ANuml5J/KabJqVqztMcaiTzDm kNOwfVmtFORU/ad4yXwUyXPEVKFfwc677ayIEuuLRhZVVOma8nKMG6/JelwGqjyBMI3l Ebrgna3X6dakq0hT+7/vDZmm1gcUqISp/lH1uq6nIHoA/D3eIJPNYeTpFIPrUliil34T gUV06/bJMoRXv0bYyBIaf/lqboy59JPjnu6tmmFv6B2hd7K6pnO2QxaCWbDrMB5K8RhW qHqFXYj/66c5LB54SEq2TSBaQ39AIfXDJ9d7e/27Vppi4Zz/uBCBvf9LA71AbVU8g6NQ fPFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=FbLimeeIAWSKH++prZUBu8VvBLGBX6LRqI36ipCTUV8=; fh=yCLyGgMspnWd9bvr8wz3R4HhRvMYrZIeEry6OC22ojI=; b=jHXTXN8h484FWsy2ageqnEi6R9TMh8Soeo/w0iKB1es5990MzPkO+uFSyq3OWL3tG9 vpQ+vzODLAll3exP4kym5T1KlNpCFgzgqKdO3WCKRRveRaVLNoX9LQ1I8+vwsZ4N29QQ Bm4GaAoisgwXCGCgFKWTF9dsgY3Wgv/OBnjWHP+eH7CQ9ZyixNi4ogh5I+G6nvQxbXiL IQA0uYHDtmgp8+ewRuhjec+XlvtiJ74tP38MCdQJfF8Pc3TWdesqvCh3k4lj3B3xQG68 bDKLbgXa3jN2GIRt9zChDsTTJSEDbaqmvLGEZnX+QJ6Z1ICxO8jPmCqJeq1rq1zN3+Op lHvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=LeYo5Jpz; dkim=neutral (no key) header.i=@suse.de header.b="J/mYFyYk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l3-20020a056a00140300b0068fce6a86acsi1259871pfu.121.2023.10.31.10.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 10:31:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=LeYo5Jpz; dkim=neutral (no key) header.i=@suse.de header.b="J/mYFyYk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 361B780984A3; Tue, 31 Oct 2023 10:31:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345576AbjJaRbb (ORCPT + 99 others); Tue, 31 Oct 2023 13:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343574AbjJaRba (ORCPT ); Tue, 31 Oct 2023 13:31:30 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF5B692; Tue, 31 Oct 2023 10:31:27 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 14DBF1F38C; Tue, 31 Oct 2023 17:31:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1698773486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FbLimeeIAWSKH++prZUBu8VvBLGBX6LRqI36ipCTUV8=; b=LeYo5Jpz/RT4uGrlS/D/o563bJTa1Ml8pINCAJHBiKepCeoVlxRMY8Mc90kANQEr2rWXfi +rOXuZPvuz1BMcbYrk+OYJ/94hcT9X+e3jJkE6/yl7El/IO9Kx7oE34Kqsc9a32eqokQC6 1QoXaalIGEeL+WDHSiYsEtN7dynOsuQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1698773486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FbLimeeIAWSKH++prZUBu8VvBLGBX6LRqI36ipCTUV8=; b=J/mYFyYkhcSt1achBAMLy5zw3k3LaiGZznv0/oxiBm/4dAgXbhPvmJrb10x2amv2f641py 2rD+YyWQgPqvYSCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C60201391B; Tue, 31 Oct 2023 17:31:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id zhmFL+05QWXCdAAAMHmgww (envelope-from ); Tue, 31 Oct 2023 17:31:25 +0000 Date: Tue, 31 Oct 2023 18:31:25 +0100 Message-ID: <87lebiwvf6.wl-tiwai@suse.de> From: Takashi Iwai To: Harshit Mogalapalli Cc: 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, dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org, error27@gmail.com Subject: Re: [PATCH next] ALSA: hda: cs35l41: Fix missing error code in cs35l41_smart_amp() In-Reply-To: <20231030070836.3234385-1-harshit.m.mogalapalli@oracle.com> References: <20231030070836.3234385-1-harshit.m.mogalapalli@oracle.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 31 Oct 2023 10:31:32 -0700 (PDT) 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 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 >