Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp439540iog; Mon, 13 Jun 2022 06:03:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR/w+kWbkGjHChhk+HKefaGA3VEGOeugqQ8d/hWdbWVqiLoiQ8AJ5avp+m1RzdlNILkVNQ X-Received: by 2002:a17:906:72d1:b0:712:782:6fb1 with SMTP id m17-20020a17090672d100b0071207826fb1mr19855195ejl.217.1655125411159; Mon, 13 Jun 2022 06:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125411; cv=none; d=google.com; s=arc-20160816; b=PWlgJyIVgNR5oZwi65TGJBiu3QUdbgiDGYgCcUgFS9Zu9Lvk0e5mhWtBbHNqOwv5h5 OsP1y8gjSFFslarGKQ7lNMhag117EG143D+U/n72JbG2GcM21dRjdQFNXNhcspSWszKQ heqoOp/Ccwq7Ub3GpduYaK8SH15m9YXsBMLAdzPvHV1Fb56Sba3Ya5yjFu6xUIYXEdVp 3K/zYK3x/6cmDCwT/2vdX/Lx4o6c6bjhnBvHo2TwihXD94H0PzW9+ytpInA+KjZSnPxU 1VLekXTvXpP3J1NG8baUGqY/kXLBfBRnXD5hHr9cnf/VmbkZXDUIL/VFtEtz1mzS5KpY 2vTQ== 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=qsP/Agnb6VoTlDUSadRTeLSQzq1tQRCcAW0yiHbYigw=; b=z00UVpNxFTni+p2l37UZlk/YFL6+wIMbJR2XM/m5unAtSdRIPOMuuBGiqpHzCy6bCo kxHyswmHIxyGpjUi2pqrdbCDJEqbqBIQ1r3vW7PpdZDmJXUXUQu9aB1kksSZH2Tpo6kr SU4SF3+x/2jMsog+cjrNo4EGh/JtejL4qwYZx4/mwMUhmZMWhNualWbOF8BqPuNBDTW4 miPLw5t2w5OtJOGDe/ygpxrAhpr5ue/AeEJKxZvzfyBKf+8ke3wRkZw7Ir89lAt89imT zk3IDidLqz99Kq0ByNFjnBTo3jZZl7X4aW6eswD6ZUqSo+b72YvlCkK14CF0PzziAitF i2ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QLubCmG+; 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 o1-20020a056402438100b0042e28c72c52si10727175edc.593.2022.06.13.06.03.02; Mon, 13 Jun 2022 06:03:31 -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=QLubCmG+; 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 S1355505AbiFMLjD (ORCPT + 99 others); Mon, 13 Jun 2022 07:39:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354606AbiFML3q (ORCPT ); Mon, 13 Jun 2022 07:29:46 -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 91650237F4; Mon, 13 Jun 2022 03:45:13 -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 D7EDDB80D3A; Mon, 13 Jun 2022 10:45:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40A83C3411C; Mon, 13 Jun 2022 10:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117110; bh=Z/c5ehen+zYhgQII4zdwzgh9isLY5OYpgCPNrI4qs8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QLubCmG+mF033XsPXYCZKLcRH9KneVX0BIzNtvDQECI4s7z6wlC3G1vSXg4guSqd4 2dKAccjE79hE0oFmTFnKJNN2Qh0SnIZn4/rcNVRgR3Mw4588br2SpPJ2LtC5JY34xW khuu2ddaUvHo4E6ENC1csjxJ8XtUbgEozzhsiQY4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Sasha Levin Subject: [PATCH 5.4 290/411] usb: musb: Fix missing of_node_put() in omap2430_probe Date: Mon, 13 Jun 2022 12:09:23 +0200 Message-Id: <20220613094937.454885506@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 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,T_SCC_BODY_TEXT_LINE 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 424bef51fa530389b0b9008c9e144e40c10e8458 ] The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. Fixes: 8934d3e4d0e7 ("usb: musb: omap2430: Don't use omap_get_control_dev()") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220309111033.24487-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/musb/omap2430.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 5c93226e0e20..8def19fc5025 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -433,6 +433,7 @@ static int omap2430_probe(struct platform_device *pdev) control_node = of_parse_phandle(np, "ctrl-module", 0); if (control_node) { control_pdev = of_find_device_by_node(control_node); + of_node_put(control_node); if (!control_pdev) { dev_err(&pdev->dev, "Failed to get control device\n"); ret = -EINVAL; -- 2.35.1