Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1151607pxv; Fri, 9 Jul 2021 19:40:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxB0yftpZ/8oXZSnELFKqsLhoHiCcYhV4AM0pjPfebcbl8WqPL7nL5K6DqieBHnZpgoAkEB X-Received: by 2002:a17:907:1c14:: with SMTP id nc20mr32725665ejc.140.1625884816342; Fri, 09 Jul 2021 19:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884816; cv=none; d=google.com; s=arc-20160816; b=ldpmPaPppxIRFJdHVbNsokqouPwr9rhZ+Gv+EkjxibE575QD4PpdI9H0hZpP84iFiK kvEKFxgH2UVlNAWMQ2fNVy/g8GFvmuSmbcj8oZk1kJIlFVqnwcp6VsPUzE+rhkN7mSHZ Y5rEpox801d+PQlShOv3C7Mqig1QI9GruoOzVwhlCedxdkxXwHSAkifFzGsHpb7R4XUz cOdlwQoXEdS+htOoiV6pGEZFC+r82fOkPpJPP741kaJswre1UgDhRm/KJc1ueMfJFD85 j5z/19jMH+BYWL9qdvb+wEIno0PA8ctWpJaw92aOowk4RgZ9eV+r/CIbHf+YoeOpxAsk HlJQ== 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=dwo5CsnJP0ffkaRWx3rw8QIxFQi55AK0reoEhOyuzdQ=; b=W72L4UgYb/2rej1nu0gqE8jwpQpW29OCYKYAEO7dk4dMG5NGrO9GGafsex8Zu33Uc2 5M15hIShUGYRu/J7nh0EzHNduYDZ5ilg6TpI2XKwNUIfoWeoXwWgtEAKKZwAnnCnuyob Bn8A3faWQ4aUK8/wlmfHfbBFY2XeP8Eix0p58w8GBz1SxJ3W0OhxPizkpinG6BjA/y3n qUOcMB+aVXngpRLaTW2jmfy/wvmjBERx8uu/z3cRKAylUZylGa67uWK2iPn1EJor/43f CSdjZotFXzL1yOY6//bwTei0jTcfWl2Rchq8UKADvSOFDEPeztV1fA8LipBkwpX6ezXh 5o0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZLf2yHXO; 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 a8si8776001ejc.334.2021.07.09.19.39.52; Fri, 09 Jul 2021 19:40: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=ZLf2yHXO; 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 S235445AbhGJCjZ (ORCPT + 99 others); Fri, 9 Jul 2021 22:39:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:53380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234124AbhGJCfe (ORCPT ); Fri, 9 Jul 2021 22:35:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ABC48613E4; Sat, 10 Jul 2021 02:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625884354; bh=U3XyAJ4TRtQBnQOuHtoGHvzGvSgBkJEg6w1xIsCvSHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZLf2yHXO3+AeNx+z0Vjta93t+r14m659XYX4XWPuqjjvOUSqicZe7FRZ3kTAGaBF8 +8wxVbtL42au3Xge/P487XL/OBocn2SSK2RoJitJFeJXxKekeVj03qUkpTlcWw9XOl Hx0s1A4002AwlqhXRaqutbGlOeGoUJrZtAM2olLAoE2kDGeYMHN4MqP2jqeNwUmkmm bAgh4AuPhsUf8py7yLaH8JvAaDPl98f043aNbj6w7hloTNqAByl5JA10af1dtAMssd BDZWDIj1NEf5LtdRPHUkM1cGFbdTl/7+iEFY3g14IP1V3LYanRACozRBCYjyjFqj/9 K9CA5gfNsL+LA== 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 4.19 24/39] ALSA: ppc: fix error return code in snd_pmac_probe() Date: Fri, 9 Jul 2021 22:31:49 -0400 Message-Id: <20210710023204.3171428-24-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710023204.3171428-1-sashal@kernel.org> References: <20210710023204.3171428-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 33c6be9fb388..7c70ba5e2540 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -90,7 +90,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