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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9317EB64D8 for ; Fri, 16 Jun 2023 10:29:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344614AbjFPK3b (ORCPT ); Fri, 16 Jun 2023 06:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343968AbjFPK2g (ORCPT ); Fri, 16 Jun 2023 06:28:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4191A46BC; Fri, 16 Jun 2023 03:26:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 900FC635FB; Fri, 16 Jun 2023 10:26:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E19AC433C0; Fri, 16 Jun 2023 10:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686911199; bh=UL51JaNgCJ359LQ05V71AD9hkKjINQqHj4mLIucZ88o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JZmm7nG5K3kqRuX9FBr3Hu1TnXdK6lvYKt1b9MASGSgA0t5eKa9v7aM1HuGPJzswU gLiCzO3EL62WQNnIQowKWak0xFMu2edsRHDBK5jbdxtSbA3+OtVG5eP0cGJm7V4JMw nk0Q35ChIcMUOHavl62zkRaFyMMu+10T+O+4k9kvhaoke3sI/Zg5MAw8eL1pn0HIyz C9XfBEB9JaEQ+Hf1JcxM9t9kPXdea3m/NABXKiobc2zm8KMXmLQ1LI1Rj3XorVVWv5 Aw56itYLC7mh30oi4xohhEV83Zy4pAmKKILyXsHHiqeQeDMVn3Tboem38tdAyGUiYt 5bs0Mw4i2GrjA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Herve Codina , Kuninori Morimoto , Mark Brown , Sasha Levin , lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, spujar@nvidia.com, aidanmacdonald.0x0@gmail.com, astrid.rost@axis.com, alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 6.1 07/26] ASoC: simple-card: Add missing of_node_put() in case of error Date: Fri, 16 Jun 2023 06:26:04 -0400 Message-Id: <20230616102625.673454-7-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230616102625.673454-1-sashal@kernel.org> References: <20230616102625.673454-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.34 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Herve Codina [ Upstream commit 8938f75a5e35c597a647c28984a0304da7a33d63 ] In the error path, a of_node_put() for platform is missing. Just add it. Signed-off-by: Herve Codina Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20230523151223.109551-9-herve.codina@bootlin.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/generic/simple-card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index feb55b66239b8..fbb682747f598 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -416,6 +416,7 @@ static int __simple_for_each_link(struct asoc_simple_priv *priv, if (ret < 0) { of_node_put(codec); + of_node_put(plat); of_node_put(np); goto error; } -- 2.39.2