Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1144517pxv; Fri, 9 Jul 2021 19:25:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbESxULqJa2/hIQ7aN3QK7NSBeITJ/IFt/PE4QtBj8JvUpgc8MVhVAyYxGGptLjJNiwdch X-Received: by 2002:a17:906:3919:: with SMTP id f25mr19642797eje.190.1625883916687; Fri, 09 Jul 2021 19:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625883916; cv=none; d=google.com; s=arc-20160816; b=BQwFCPQGUHtdt8q8nEqrajsXkJg6t98Ly47h2bZgsi9wN1cTzQeA0bM23Xa+NttLO6 Z8hYNB/cbE3W2dYlVM/UWrvs3pz/ENlzH+1VzMvaaqFsM+HW+EC1v97Vf5ZwD7R8nLdG 4JBUCgfMbJATt8eEVV0Gjv32OMIB/AXzpa+ltIatlJvLbxhNolmsmxdtTaeIv7Z1KjBs tXHRPXYAh/l6jem+Ho1TTzkbG4AoxsfX8JnM8JWyOa0Rkajal5IloOwHdBnjEGpUL5Ih rCnMl46Wpw1qzggloB+UFiDXDWKOTMG3NTQXxpWzSg+lm+9cl39DIWLB7wG/EuOnEoUW wIdg== 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=LxZI39ywyLDvax/XscXC/t9W9dwLGstZeHY6nAo/U0leHOZKwiGUPCtuTDC3jzilMx LYPNtQ9u2miwqWw3RlxJ06/A4DNJI86JIHoD3hsxE9ozPLe7tKwwecSNusJw7P36aTyN ggZ3Zt9F20fdB+w8Sn0AILLHwxLwGs3BeHv/YJG4JRJf6yHDdyCLdkFhC0bHgkyUx4zW gWf9ODpje8hDp2VpUS0HU09aQUNp8bxeCxoShhctJTD9z4GLoTIscH79fk7UOg+5zHdv 6PisZO1q438xFjoQl2hkOfemLiN/6PGwyo+RHPtAkdM5OwOkrurr6j757XYZgJ2Hbmfa QiPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N5fKqCtB; 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 hx8si8844532ejc.522.2021.07.09.19.24.53; Fri, 09 Jul 2021 19:25:16 -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=N5fKqCtB; 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 S232493AbhGJCXi (ORCPT + 99 others); Fri, 9 Jul 2021 22:23:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:38804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232589AbhGJCWT (ORCPT ); Fri, 9 Jul 2021 22:22:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C9BF4613B7; Sat, 10 Jul 2021 02:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883569; bh=H65BQimBAwbH5n7kbcYzCOuiT8nnBa5h2f5AOhcpIMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N5fKqCtBoSv2maue9+0qlOgqnMvetaBeAaGBJr5bWneS34KfwzlhqHZq1m6ApXHOe 7+IWHjKvXkzvSpvrP+PSeEgCFloc8tFPH9Z7VLuQB/01RWNoSRp4mlWNYYX0Mek5BG 23Bpw41AVM58SzfMOhxhsnSXybISMEO91C2Ybd4T6xq9pzh0PiTobGU+At4JD1I8GH EoW4m0v2q0LR9Psv8wvsMlytfb8kxNO9xsm/HuxZgq72zx9ds9IOcqBJZ4+S97ah5G vJmc3f6xkZWmnLL25ceX0eHeNhKtXQ2nf0dUEVRldA46umOwRNf86TLLu/+RpbRSeO bVQMw/WTt5NLw== 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.13 075/114] ALSA: ppc: fix error return code in snd_pmac_probe() Date: Fri, 9 Jul 2021 22:17:09 -0400 Message-Id: <20210710021748.3167666-75-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710021748.3167666-1-sashal@kernel.org> References: <20210710021748.3167666-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