Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1148506pxv; Fri, 9 Jul 2021 19:33:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbrIuS3Ne2wGufUq5aK6ZhbljEXz/pe8jj6LuOxLKnA1gqCfA4S7Q31erH3wsKJipmT5gq X-Received: by 2002:aa7:dc02:: with SMTP id b2mr49743719edu.46.1625884424059; Fri, 09 Jul 2021 19:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884424; cv=none; d=google.com; s=arc-20160816; b=rDa9qWlnxdNNUzRHmL7N3EDgHjG/cX1jEwpsmvTp7/yEo6Wn8lcs2b2VtlqqdFoOQH FBIPrb0+LuW8O3b9y27ob2sJwfZ9lSTb+8d/m7zFqQFsDDvds8zvqN6Dg5jlqJifbXR5 IJ9UtnQO4aDA7MyzxvMkhfCfAnQby1PH5sHrLCRbRPFDCVnfmjnEc3sbsDctaAvp3EyO Q6PPM3ErMQgx6mE07wHN01t+Aw8+V8PY7bySFlM8flGlE3AwSphqvXvvxRoOTv0MRV2G LsyK/dtMtgn8b0rX0lQ8QSr9VtFn3HmdzN4EIrbq35unHb8q0gjicwsAqywLt6iMojr8 wqKA== 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=BrCuO8imMH5P5OJGdLLyh/SI+o1HdSK+z735BeJiZ68=; b=fmZQ8XWTi6fV607djyBCBYvero4/c4aUfJGHgY38YuwfzOfZ/9BFj7x2Gtm9G1nfvc fMLIrG2suKhsB4U8KSBVtdRY3b9J6mbh1Ej2E7Q6zKLJ0t385rRgkWNE6Hb9xUq64WGf i351nQts6n+4XlbrzvUOK2K4/h1kxLyponzaCVvv/gj6hWl9PMQA9MygjW7JMHbHrBSB NYTUljmS5psdhDfTVdkb4pT1FqqvOLczXnGUZd6y2AlIrMYGEx7263XQLzS3f5davTV4 gy8U7mJ2zuj+MIxm/OY3SyEWr543nXfyAPVRo8nHXuVigQrPIQ5H/yP85J3H6f/Iqr1A BwzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=e3E8JphO; 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 6si8640079ejl.599.2021.07.09.19.33.20; Fri, 09 Jul 2021 19:33:44 -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=e3E8JphO; 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 S234554AbhGJCdX (ORCPT + 99 others); Fri, 9 Jul 2021 22:33:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:42926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234348AbhGJC3X (ORCPT ); Fri, 9 Jul 2021 22:29:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1D7A461455; Sat, 10 Jul 2021 02:25:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883950; bh=aNgvai2dHUFLmKna88+VloTUFYnAA2YEoAtKk5xaEIQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e3E8JphO8C64L73x3UNEiZ3w0yPXMXNgkVvWYQUR/a0chOPDc4GEadM76pq2BCBHn wOTnqfZVziS61bQH5tBeYYfB24wmhYkr9XSo+1F3SF2urJ9ABphakJ1uvEKOtkLEaq Z5rZVun30o1GFacmN/nfwWqzWnQfoKeXhgnzZ45/7/hn0p+GYDUecfqGkKQsmt7b1k JLO+1skbRVYWI14ok/QtUYsFDpv50y0vJl4WNGQF2PijuB9Yezayp9zrTW0Vb6G1eH o3QP1hjBgYbrWHf/gi0xla7Ff4cCehVK8x/pgd59+qybrSqhiz2U7HE3ogJuNhqOYV o2urF+v2UqMvg== 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.10 62/93] ALSA: ppc: fix error return code in snd_pmac_probe() Date: Fri, 9 Jul 2021 22:23:56 -0400 Message-Id: <20210710022428.3169839-62-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022428.3169839-1-sashal@kernel.org> References: <20210710022428.3169839-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 96ef55082bf9..b135d114ce89 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -77,7 +77,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