Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3245623rwb; Mon, 15 Aug 2022 22:11:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR4g7aHNT9mPmpFWg276FzaWk5Cnk3dRfitq5WeIyzm7qdVm4xsnhGmu43Ah0BFZiecjf5gE X-Received: by 2002:a17:907:e94:b0:730:af21:cf60 with SMTP id ho20-20020a1709070e9400b00730af21cf60mr11659175ejc.681.1660626675779; Mon, 15 Aug 2022 22:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660626675; cv=none; d=google.com; s=arc-20160816; b=vnaEMVVm+kispnN5Z2/CLIHqoQx4f32Dq/Vdl2B4wrFvW9eweoCh+71ouh38XIZhu4 KM888qXPkK8aSP4hnZMcFKqQ4Vgfu6FjlvDzzmp39RgdqF2yakoBGatKkD09p7mu4arI zzgWV3sdi/VNHDuSw28rHxMv+IJGAzr33TpCoUH/iCWy6sP80Hr5DQaLj3JmMcDo0L9l M/7GMBBTAzDt5bl80nQdVvVTSmFewt12CvGEVTIHyOl9+Sxk+4iAbuRzOWslZY3hf7tJ FgViQknpUg3ytapzfB2/6j+ze4Ig5rExwPnKREllPp/KKTvK23bBkgLfZczFy1smF+Y7 tqrQ== 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=zQpNZujrj7rOL+HrEhHAoYEvhn+mk9veZLQ1fVlZefZIWYLZrPRoPq/tEppX32WE/4 Z6Il+nF6t4V0gnXBGKsXl2ocSKpAvyDr3GXN/099HLqVP0xsl4QijOIOwhQ5DjuJ5Dsj iIO50pu3LIskhogmssVm31MycYezySm08xTXxBApJkV1+5AYmcbH4idvEKWjiBy/CYHb cyogXFHJrwXYN6FEsM5hQe11DeCQh8zwPb7oQBmT4gVvlqP2pZf4TG1TirPkX1mz7HgO 8qHFn07T6V6H2xVKVEEH9/pB8BKJjaQGclYl/H3mP63BkA9pp7uEYdsbhZOcu65yluq2 4Bww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CXujc11W; 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 b69-20020a509f4b000000b0043ccb3ed897si9463740edf.213.2022.08.15.22.10.46; Mon, 15 Aug 2022 22:11:15 -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=CXujc11W; 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 S229526AbiHPEcx (ORCPT + 99 others); Tue, 16 Aug 2022 00:32:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230040AbiHPEcN (ORCPT ); Tue, 16 Aug 2022 00:32:13 -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 65650979C5; Mon, 15 Aug 2022 13:22:24 -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 ED5696108E; Mon, 15 Aug 2022 20:22:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD32DC433B5; Mon, 15 Aug 2022 20:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594943; bh=0e2tt6DrrV1ZWC1oY7l9p4t3b8AMy0FXCj2qQ2cAlz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CXujc11WGwsTPm5Wt3NNHB4ekwxWqGlJNgUqzapLuzKVHO8Hd0JXrTn3o/9JgLRyq 7Lq6p43ORcP9RvFukVHHOCO5YjOYAWjreKwz4w/VNgPTHwCRDVmryJsC893S4syku5 /f1q+liGNZ/L5WvyfUSKOWiwSzARU4gQwKNxzlcU= 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.19 0607/1157] usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe Date: Mon, 15 Aug 2022 19:59:23 +0200 Message-Id: <20220815180503.944754904@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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