From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55C76C433FE for ; Thu, 13 Oct 2022 00:25:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7EC08540B; Thu, 13 Oct 2022 02:24:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7EC08540B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1665620738; bh=y1DBNfu6J+1iXQV3cyheZ8RvEKrcWUOykKgA/HCuzNU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oxSaUMhs6fwvoWvDwTlQBLSzcKDJVBQ1vbfbDPJR2BlGJeHMyWfzH2ObP5iD1j8jF byfc+/ubLp86KD1deHzw/RGl2P4O4b+jStIk6uNgzZJL13WN4gk9IHY5ERafBqvd0i w168YEYCJQSlxyrh3NLgKMk6IDzG21dP3IcZ3RBI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D342AF804FD; Thu, 13 Oct 2022 02:24:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 88A16F804F2; Thu, 13 Oct 2022 02:24:24 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 658D3F800F4 for ; Thu, 13 Oct 2022 02:24:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 658D3F800F4 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g51v7Vzp" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4658D616EA; Thu, 13 Oct 2022 00:24:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51630C43470; Thu, 13 Oct 2022 00:24:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665620657; bh=y1DBNfu6J+1iXQV3cyheZ8RvEKrcWUOykKgA/HCuzNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g51v7Vzpss9kAbFj+WE9oD2u57sDyfeJmockRigBNWRCaETFbZQJEzXcL8pdKH3zq t5EcI8RQSOAsHBb1Qxuh2O7aXA1NAzjf3YHoVlrockhsUPv7myZ0rtbW62rlMlYh2o bdmjoXswhmRBZxU2Jb5jIIQ4iYhcFs/1eTkrolmUbgj+ayKUJWaHAGMwdCk88pMJTx MAYSrW7roVRRs7vJHazo5kn5/NMCSLaUsEKVFdkAW/nCFup3GiA/TCSXzJ3/Ou7znL 0q5ces0DP1UJZCfLGZ/6txMxZpCbbvukjWjq5qKBwSDVLfKId9b6bj1oeVxxQi768T tSURBKcTWUZUA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 17/33] soundwire: intel: fix error handling on dai registration issues Date: Wed, 12 Oct 2022 20:23:16 -0400 Message-Id: <20221013002334.1894749-17-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221013002334.1894749-1-sashal@kernel.org> References: <20221013002334.1894749-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Cc: Sasha Levin , alsa-devel@alsa-project.org, Pierre-Louis Bossart , Rander Wang , Vinod Koul , Bard Liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Pierre-Louis Bossart [ Upstream commit c6867cda906aadbce5e71efde9c78a26108b2bad ] The call to intel_register_dai() may fail because of memory allocation issues or problems reported by the ASoC core. In all cases, when a error is thrown the component is not registered, it's invalid to unregister it. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20220919175721.354679-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/soundwire/intel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 824d9f900aca..942d2fe13218 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1470,7 +1470,6 @@ int intel_master_startup(struct platform_device *pdev) ret = intel_register_dai(sdw); if (ret) { dev_err(dev, "DAI registration failed: %d\n", ret); - snd_soc_unregister_component(dev); goto err_interrupt; } -- 2.35.1