From nobody Fri Dec 19 18:41:44 2025 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 3AA17ECAAA1 for ; Mon, 24 Oct 2022 11:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231779AbiJXLso (ORCPT ); Mon, 24 Oct 2022 07:48:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231601AbiJXLrw (ORCPT ); Mon, 24 Oct 2022 07:47:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87CD62E9EC; Mon, 24 Oct 2022 04:43:12 -0700 (PDT) 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 1D89161277; Mon, 24 Oct 2022 11:42:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BE85C433C1; Mon, 24 Oct 2022 11:42:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611744; bh=gVRxCi6HdZ+Y2hyxhs77KDg41vKK92c+2may0MmZ35Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uMKGRpnVtoz3nyRzROiWLnIAoJgctFNNqNcRcKrrh2LJf8W+PRS1Ccs7kJwxxX3XN zZoPX7K7kkLDJzjZqHe5LdqxPA6T3U+PuORp2MyWKLrOIvBApXwCBTySaW2+GkL3MP zjxDYBj+ZFb1xhv/MItaemkKSxC7jLHY5AtcbzQk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Sebastian Reichel , Sasha Levin Subject: [PATCH 4.9 095/159] HSI: omap_ssi: Fix refcount leak in ssi_probe Date: Mon, 24 Oct 2022 13:30:49 +0200 Message-Id: <20221024112952.897460797@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112949.358278806@linuxfoundation.org> References: <20221024112949.358278806@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Miaoqian Lin [ Upstream commit 9a2ea132df860177b33c9fd421b26c4e9a0a9396 ] When returning or breaking early from a for_each_available_child_of_node() loop, we need to explicitly call of_node_put() on the child node to possibly release the node. Fixes: b209e047bc74 ("HSI: Introduce OMAP SSI driver") Signed-off-by: Miaoqian Lin Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- drivers/hsi/controllers/omap_ssi_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controll= ers/omap_ssi_core.c index 22cd7169011d..56de30c25063 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -562,6 +562,7 @@ static int ssi_probe(struct platform_device *pd) if (!childpdev) { err =3D -ENODEV; dev_err(&pd->dev, "failed to create ssi controller port\n"); + of_node_put(child); goto out3; } } --=20 2.35.1