From patchwork Mon Jul 19 14:54:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 480033 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4291466jao; Mon, 19 Jul 2021 09:36:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBNu9czO4QcW514hV51K9cwSZe1PBFF3l0bgd88qku3XgzV0ZAYzzGcI4KSTiY/IbQIwtG X-Received: by 2002:a50:8d4e:: with SMTP id t14mr25411281edt.138.1626712566029; Mon, 19 Jul 2021 09:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626712566; cv=none; d=google.com; s=arc-20160816; b=GTPYi9sGBbfvuPkuIbV13ysR7NOYbH0mtgXMUiHxh7Uj0uEuDtzKepexDFaLkYlg9X NRb4yeQHqY0Hx1ZVNdK3wHbxaIbJoj7TiR9z8D7DI6DV1BuP9w7jF0u7QkQhUXUO23Ay S97XuIOONj9HzY7Bl2fBF1vwiZ7jXOAgfqxFFEb8zJcp1mmAfxsO2LD0ahLZmTTUgmXk y0N7GU7uB/aOknNocj0y9D0V6EVRRzrhJNrkj0Oc2DadlS85vyuZe9N82qdYWjmZCGVc bHKdzFv3COcHZWebbhNnrrGcg3EhRJdDsL1P/tgpeJzOtFwak3UIFAmMUxXw1DLTkNfd QdZA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0VX+Lray7DBd2bqJ+rwDji5O43EswY7PgcOFSatkLDM=; b=cPN5fVSiV3/MbDededZXPDVmzTPTM4OGxaJJD/lWZkJfh+mqKdrtnskDfJNa8YttkV YKLGWQOS/lRiz6hOgvEg0mvurmYeT85OwA5jlR6I2NU9a2CMGCtwdpL5xatW3whrYsxb ClxAbMiGTEjmUBfZ13r/0C95fXQbWlvkBYVm5MLYCcjQhzHdM2+1arV88oRUhFasaL7I ZchjC86yo36ipspNRYPxrCAUs3qd0ZXAxc46UMps7reV+SHqbhJedggub1vKtRpOE1zv M5Jwk94K5BasD/lZjCuM1vhS/83NT5AMdLMkWWnkfU+IUncZBNU3CdMm314tNuJZ4QNH OI6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kp8GBxCJ; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la14si22045543ejc.142.2021.07.19.09.36.05; Mon, 19 Jul 2021 09:36:06 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kp8GBxCJ; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349090AbhGSPuI (ORCPT + 12 others); Mon, 19 Jul 2021 11:50:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:47918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236736AbhGSPqS (ORCPT ); Mon, 19 Jul 2021 11:46:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 050D76128A; Mon, 19 Jul 2021 16:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626712009; bh=uG/bOACiXnipF7frzN43OzvSqgdcFLXtJExWq0kHYQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kp8GBxCJ6dqgZmsbzadcdX1ucZrz2aodYp8CT5lQ62Jq/aLHnuG46I+BCpZI7lPUq FG4hHAQx79TrpSULCJnFnpV7tIJhsJwV3A+tqTylNrb+PiZeSWLnFxRVcOUypxeP24 GKZeQe6/otr4J2oQlC0YoZIWh8GJ014YfQIpXYUg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Takashi Iwai , Sasha Levin Subject: [PATCH 5.12 215/292] ALSA: isa: Fix error return code in snd_cmi8330_probe() Date: Mon, 19 Jul 2021 16:54:37 +0200 Message-Id: <20210719144950.065253254@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.514164272@linuxfoundation.org> References: <20210719144942.514164272@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit 31028cbed26a8afa25533a10425ffa2ab794c76c ] When 'SB_HW_16' check fails, the error code -ENODEV instead of 0 should be returned, which is the same as that returned when 'WSS_HW_CMI8330' check fails. Fixes: 43bcd973d6d0 ("[ALSA] Add snd_card_set_generic_dev() call to ISA drivers") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210707074051.2663-1-thunder.leizhen@huawei.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/isa/cmi8330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.2 diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index bc112df10fc5..d1ac9fc99491 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c @@ -547,7 +547,7 @@ static int snd_cmi8330_probe(struct snd_card *card, int dev) } if (acard->sb->hardware != SB_HW_16) { snd_printk(KERN_ERR PFX "SB16 not found during probe\n"); - return err; + return -ENODEV; } snd_wss_out(acard->wss, CS4231_MISC_INFO, 0x40); /* switch on MODE2 */