Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7137338rwi; Mon, 24 Oct 2022 10:15:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM73bzME8kDNzrrmdahfi8ZaMYPDQO7eOsDY8r+ezBR/XL6xW/gI1IpExI5TmwvRjIz1t5xz X-Received: by 2002:a17:90b:3847:b0:20d:c41f:de7a with SMTP id nl7-20020a17090b384700b0020dc41fde7amr58691129pjb.85.1666631701164; Mon, 24 Oct 2022 10:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666631701; cv=none; d=google.com; s=arc-20160816; b=UlBDAnSECnXmhu9fqqWBxCy0guMcOdQjq76Qh7WUVa0awHHRxFZHm7AbL2IcBQ5t0s cQBdTFI+CBE3vN6mu706mT/tw+16RCXiRHgDFcv3uz3popEOsRqPi736XTaBieenMFEF 0LpcVuDvMZwaQSzhgkJRCV2R6ZulxBJFAXohJLuB2gPVa1lYjTYFn+CrlUPKXpzpHwQ/ Dpmlma9ZwYN9ZyUQrmhZmt7arTpxE18HlAAP5O37Zyt/7qANkh5AEb1CfoBh3IvZIvTz 0SswGsoIzMrJ09mvypf8U5oZmqFWjzzu5zYcVtYRZS+zJCfP9yJpZi+uK5mZwOpd+tcA DINA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MygECGpZxrjTPFOXjY3DcVfhnAFDCTsr1lJBGOWmg7o=; b=WfN3gVtiLJUmIGyXKcIz8jjAV2gb+To/s/Gn5YIv5k6YIHPCVC4VBuIf2wSQ81BuKW iG7mFfE3S+/NLhtbjX29vXfaPmJ8XJErzTArqyaoakVqm2Z4joCmV+HQlCzUcpfAIuTv QL9TR8AH4hwrp/2IOd4D5mak6yYkPO6OyXHmfNFMLV+UrOm6agd+vNXkFj7jM9t3WZ2L UzwpiY4mHfOE6icF0xHgNchU6y7r1jnHYBFd6rXr2FX9o5kKvWyvul5MokohRQfT+1vU yVzGKiof71J5chjms7z66Fomoo25b84swo2DRHXDtO8MFHpY4OYTNSF8JaRFGwhvBwBU /dmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B4ZFXv4l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t190-20020a6381c7000000b004606d9040b9si36752955pgd.649.2022.10.24.10.14.49; Mon, 24 Oct 2022 10:15:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B4ZFXv4l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233227AbiJXRCx (ORCPT + 99 others); Mon, 24 Oct 2022 13:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233538AbiJXRCX (ORCPT ); Mon, 24 Oct 2022 13:02:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4E38160852; Mon, 24 Oct 2022 08:38:57 -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 ams.source.kernel.org (Postfix) with ESMTPS id 1B905B81204; Mon, 24 Oct 2022 12:00:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78D25C433C1; Mon, 24 Oct 2022 12:00:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612803; bh=p9732RSsGgZuE0sVRNVEJIAFnxTmYtgxzpoRqKThgks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B4ZFXv4l6qP/CqSXW0KWC1Lp4Dtk7/1A24vWMCay2ybyQg4bS6k8rItTt7vzeVMGQ w6HXwr218B1O20XRN3fB0/DVwRIB9SZHSq0+2w+BlVsX9jAuCK23T4QZIWyhFC/01H 3La/j/WzdcNir0mCIFMduPUW0RPb4qk3wk/clAiQ= 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.19 126/229] HSI: omap_ssi: Fix refcount leak in ssi_probe Date: Mon, 24 Oct 2022 13:30:45 +0200 Message-Id: <20221024113003.079294681@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/controllers/omap_ssi_core.c index 129c5e6bc654..15ecc4bc8de6 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -560,6 +560,7 @@ static int ssi_probe(struct platform_device *pd) if (!childpdev) { err = -ENODEV; dev_err(&pd->dev, "failed to create ssi controller port\n"); + of_node_put(child); goto out3; } } -- 2.35.1