From mboxrd@z Thu Jan 1 00:00:00 1970 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 54134C4332F for ; Tue, 31 Oct 2023 17:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346725AbjJaRbb (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >