Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1145069pxv; Fri, 9 Jul 2021 19:26:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx28wsFoyvo6425CH6Eoc8snAeM9yuq/vr8d3ENP7Hzni85RI+UysuIbjkmIamLcG8BU5rL X-Received: by 2002:a17:906:36d5:: with SMTP id b21mr40372076ejc.258.1625884001455; Fri, 09 Jul 2021 19:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884001; cv=none; d=google.com; s=arc-20160816; b=O6DiwH000SYlJiLEywfQjEmNwDyPvf55kdEzaQfDL4/8sihz2F10kYelMI/xp7kOc9 xllMwSSqg8t+PE1nfmxqOQilCE5O0O85sZiKCUoeZWhHhZ390MJhhxRyhZzPbNA/U9iM /cyYm8oh6uBCG7KnlO3rLuY1vrL93roBeMZ8/WPILk6uq9JQGUj/pA+BIUvKbInNOujj 6P4B+ETlBpKk1KbzSPYieN2AsndQdH/hZSLB05CUMpaz2Z2kKF4lCSx1IaCkGrN6iH0b CjYDqLtA2wR3CFsXw25rCxA1I5aFJaeT4FXlJgnH42b+/F6cXVMfZ61szp0B5PE5QnlK wCwg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pf83T+FShTSQa977CHSjblO0xH396EVwREN7PvOYBTU=; b=v/hKYB3fTtGMOjGUvdB9UqCsg94DDwWCxCg4+foHZ5zW5dfhfjIG3C10KFbHO8c1rc dwsiZid8tVmuSheSn5vAfCaHh1K/0fKIeWTeyR56iCc4ZHwYkJmzW5sMj28p4PEVzMsn sm+r1v5SVY6/CJxk3wNfN7mehi5fWFa2ouVF7IylmZ7esBA1rBxnzTcSeAUtOijRako1 T0xDrp6o871ttbO9jSNewZAZ4SG5bwjA1hyiSZvZvTYpzQIbhSDYGB7GwOuP9EYWa5El op5PkteKQXfHcZo+A4Iv9JW7ELd4HzAC8vsv3pVP6SRvQCK+qoRu3atlj10gnkEHBXVk JRCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RQlozIuj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o23si1125005ejc.470.2021.07.09.19.26.18; Fri, 09 Jul 2021 19:26:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=RQlozIuj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232946AbhGJC1a (ORCPT + 99 others); Fri, 9 Jul 2021 22:27:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:41746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232785AbhGJC0Y (ORCPT ); Fri, 9 Jul 2021 22:26:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0F62D613D6; Sat, 10 Jul 2021 02:23:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883804; bh=H65BQimBAwbH5n7kbcYzCOuiT8nnBa5h2f5AOhcpIMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RQlozIujoDD1Q/+9t6qErabHd1cZ2AkgfqZIlITX3FOgi0xxi1MR924p6zvpTlwBy SN5BpU89vcapoQzXoKbDYTxOVNKbaUFfjwKPLV4+FB3oXSO8BjhDEN8laHcNPQluSh rX/7r6cEa/CawR1Mf33W0iaKqHDPF4s0LCmvIui0SZ8sJFpkHDhu4ADaBMZTA9S3hk tqL4UNSeGBTasbWG4TW/fufR8G5FSMOgHRjZUET5EPOjM9xJgjb+rvHCrt38388Z98 TwaogTeIgriobPuUg0O3QORAEnj/IPH1o0flL+1zvs3x7Q/Y1T1T2h5WI6G1F3hKxM j/cAxWe853+KQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yang Yingliang , Hulk Robot , Takashi Iwai , Sasha Levin , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.12 067/104] ALSA: ppc: fix error return code in snd_pmac_probe() Date: Fri, 9 Jul 2021 22:21:19 -0400 Message-Id: <20210710022156.3168825-67-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022156.3168825-1-sashal@kernel.org> References: <20210710022156.3168825-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Yingliang [ Upstream commit 80b9c1be567c3c6bbe0d4b290af578e630485b5d ] If snd_pmac_tumbler_init() or snd_pmac_tumbler_post_init() fails, snd_pmac_probe() need return error code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210616021121.1991502-1-yangyingliang@huawei.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/ppc/powermac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index 9fb51ebafde1..8088f77d5a74 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -76,7 +76,11 @@ static int snd_pmac_probe(struct platform_device *devptr) sprintf(card->shortname, "PowerMac %s", name_ext); sprintf(card->longname, "%s (Dev %d) Sub-frame %d", card->shortname, chip->device_id, chip->subframe); - if ( snd_pmac_tumbler_init(chip) < 0 || snd_pmac_tumbler_post_init() < 0) + err = snd_pmac_tumbler_init(chip); + if (err < 0) + goto __error; + err = snd_pmac_tumbler_post_init(); + if (err < 0) goto __error; break; case PMAC_AWACS: -- 2.30.2