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 A8167C7EE21 for ; Thu, 4 May 2023 07:51:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229661AbjEDHv3 (ORCPT ); Thu, 4 May 2023 03:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjEDHvX (ORCPT ); Thu, 4 May 2023 03:51:23 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C1D13592 for ; Thu, 4 May 2023 00:51:18 -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-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 Cc: Daniel Mack , Jaroslav Kysela , 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 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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