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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 720C1C77B78 for ; Thu, 4 May 2023 07:52:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C2C8615F9; Thu, 4 May 2023 09:51:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C2C8615F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683186759; bh=r3uUz8k4jIaLr561uvaPOG7e/98OOcL3GMdfeEM55/Y=; h=Date:From:To:Subject:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dlCOEbd8gftpVrIxGgQYfG9BKuou7CCGvBX1Dg8QtIggUO2K4YilaKeKJA836bwKu 9bk3JEXYUhWWpLlISdLY/6uwPqGomtWGsDkQjs8ntJ0XOvAAY2x1qSnnXipuW4TrWk upsDnz8q4RKmqtKddNiro1V9YTo/TuyWaCKPIobo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 70ADAF80114; Thu, 4 May 2023 09:51:24 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 64E98F8052D; Thu, 4 May 2023 09:51:20 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 05832F80114 for ; Thu, 4 May 2023 09:51:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 05832F80114 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=mW2wMoze; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=G7fHDH0p 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-out1.suse.de (Postfix) with ESMTPS id BAF6C22BBD; Thu, 4 May 2023 07:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683186676; 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=D6geGX1BnObw5oqPndFE/tdK8lnuqzTuO9cPmjbpg4c=; b=mW2wMoze5S6M+Oru53oX2lrZ2iRA22Rmb6EO+FjCRwKjgcy1bJHPWe6SMRaaD21hj7hOdk SCVjcWjp1MfUbuXocZWu25h2xDhWG3ODHUdtOrtWGDmKFQ2wV5pZbIvHHCF93Trb3oORfv QDCovBcO7Q2rOfTQhGHQ07oNiJ9GIck= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683186676; 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=D6geGX1BnObw5oqPndFE/tdK8lnuqzTuO9cPmjbpg4c=; b=G7fHDH0pwwp+ZDvpaXJU7JokzY5sr4zFZtkWxDWtzpaTUejLuIqR3dIhqD4q7UiaDlpudn Atstft649K8n27AA== 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 72843133F7; Thu, 4 May 2023 07:51:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OdrTGvRjU2T+IAAAMHmgww (envelope-from ); Thu, 04 May 2023 07:51:16 +0000 Date: Thu, 04 May 2023 09:51:15 +0200 Message-ID: <87ild8mt58.wl-tiwai@suse.de> From: Takashi Iwai To: Ruliang Lin Subject: Re: [PATCH] sound: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init` In-Reply-To: <20230504065054.3309-1-u202112092@hust.edu.cn> References: <20230504065054.3309-1-u202112092@hust.edu.cn> 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 Message-ID-Hash: 2REEQFINUP3623VOU74SYQ4FAZXLO7JP X-Message-ID-Hash: 2REEQFINUP3623VOU74SYQ4FAZXLO7JP X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Daniel Mack , Takashi Iwai , Karsten Wiese , hust-os-kernel-patches@googlegroups.com, Dongliang Mu , Daniel Mack , Jaroslav Kysela , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 04 May 2023 08:50:53 +0200, Ruliang Lin wrote: > > Smatch complains that: > snd_usb_caiaq_input_init() warn: missing error code 'ret' > > This patch adds a new case to handle the situation where the > device does not support any input methods in the > `snd_usb_caiaq_input_init` function. It returns an `-EINVAL` error code > to indicate that no input methods are supported on the device. > > Fixes: 523f1dce3743 ("[ALSA] Add Native Instrument usb audio device support") > Signed-off-by: Ruliang Lin > Reviewed-by: Dongliang Mu > --- > The issue is found by static analyzer. The patched code has passed > Smatch checker, but remains untested on real device. Thanks, applied. Takashi