Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2925943rwb; Mon, 15 Aug 2022 14:11:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR5t8FvyOUu7Wn0KftqzDyle03R4gIa1TqrUdmcxAuH9bgkOtJvEsieWNW3fuG4k2HvapI9/ X-Received: by 2002:aa7:c70d:0:b0:440:432a:5f9e with SMTP id i13-20020aa7c70d000000b00440432a5f9emr15649394edq.110.1660597862090; Mon, 15 Aug 2022 14:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597862; cv=none; d=google.com; s=arc-20160816; b=LnTf7wsVkZ+rep3XKQacbgTIh78ppLMljWK0zzSa+JaOm1Z6Sqhj/o94TGd+27VSP4 Xebf2eFFnHOFjc3aDeOK8/9Ue5UlbuzeKoFR0WMusInFABJoVQVuezxMwVJG4O6QAE12 RJLemOVwj/rr0wX1x6PcEJMeHPKL5R0yE0xgBXaddt/K7G7UvsErFfqfx5sYqpb5uF39 8xhomia8eO5xrG2F/60Qe877VemvUlciynrikwd/0o26goFfc7UcJT/JyoM2gu0+XeIv PZa8kB+rVK5i7u2Kdp1mkLskhmkbXkHfaJr6jBmVDOtnHwaPKmKma/nWQ9Not4GTS5mp gRWA== 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=i3Ry5+l8P7AycRvGfjIyLldXuxDWnA1862HQihVw2Qg=; b=tdCUfANe/4WQFbyf++JcabUqvGhrOklu2D4bNyg5Oe7E+LymznvTQbT6A51c3qKf7k CjfUswQkJNuonIj7s9cklQ5WX4lMKQ2B5KhtW2YD3b0Di8ZRP1DGdZCIlhp6LlgCCEl0 00u1qDFbLIqVM2ctS2HLIwAn813N3KUsNPfAoQN5GVuoDISwVCIG0oTheZueUBTjJoiq BF0PsAuP3IKhCV+jggt4l90nInoW1Uc9ecgG4MwhspePBuWhTAO9s9ysj28yHYM2Nkqj +kZoCsC13461+YcIS7ZCGDX0jej+ze+Lsupbjji6JBC30D75oHtbFg68tfLbII5Nk+FV K3ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yn0NA9uH; 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 ne23-20020a1709077b9700b0073153a34a64si10815987ejc.249.2022.08.15.14.10.36; Mon, 15 Aug 2022 14:11:02 -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=yn0NA9uH; 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 S1343542AbiHOTIs (ORCPT + 99 others); Mon, 15 Aug 2022 15:08:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245595AbiHOTFy (ORCPT ); Mon, 15 Aug 2022 15:05:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFF684E63F; Mon, 15 Aug 2022 11:34:35 -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 8CA41B81072; Mon, 15 Aug 2022 18:34:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C77FEC433C1; Mon, 15 Aug 2022 18:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588473; bh=0e2tt6DrrV1ZWC1oY7l9p4t3b8AMy0FXCj2qQ2cAlz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yn0NA9uHvjU7UbjePtyKQhCWqzQoRSmaV9HT2hO8WJ6FOdY+3tJcH5jUOKnvUM17i N0bG/BAlxqC4RTqL9UH9u1VTCyLHdvkDXHZqx9s86JCr6FHyYzyhgwjLZhKuDYl2uV EPXKkVNNb24NB0krCzWvRzHRzWMwfHfm0HfvQp/I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Stern , Miaoqian Lin , Sasha Levin Subject: [PATCH 5.15 414/779] usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe Date: Mon, 15 Aug 2022 20:00:58 +0200 Message-Id: <20220815180354.963152535@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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.1 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 b5c5b13cb45e2c88181308186b0001992cb41954 ] of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: 796bcae7361c ("USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]") Acked-by: Alan Stern Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220602110849.58549-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/host/ehci-ppc-of.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index 6bbaee74f7e7..28a19693c19f 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c @@ -148,6 +148,7 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op) } else { ehci->has_amcc_usb23 = 1; } + of_node_put(np); } if (of_get_property(dn, "big-endian", NULL)) { -- 2.35.1