Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3026240rwb; Mon, 15 Aug 2022 16:24:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR6t4Mez7FVku3z6lW05HMWDFgG5RwZQOV8wq7fptYkm3k3BaU9VHAynPCDJ7zPBecmLm0w7 X-Received: by 2002:a17:907:1b1c:b0:72f:9aac:ee41 with SMTP id mp28-20020a1709071b1c00b0072f9aacee41mr11681765ejc.56.1660605858972; Mon, 15 Aug 2022 16:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605858; cv=none; d=google.com; s=arc-20160816; b=m7WW7EyZsLzNCBhEit/K6tdzoPKRkeTDPLfyW4Limeo7NhKjxQ/f8RA8uP5hbObJ3l jSINCilaJ4IsauYOZR0mWAfzKPlv5ztqZwQJhlbU/hFsVmCNT/QWI3F+RUuUWjJTYIBC nwXOcv5j7UIez5+fVIc1lhCcAsHDuoK/kr8vmog4tPT7dVPwsQ3S4EsecvxktQwwa5dg WgTBzKIUS7uZqxm0syUtSSCRt+0a/XHypOucWSM3XNTPB6MuwCjhHmSUH47iiVYz1poJ JsCawK/tUW/DXM1Wuobrlr8fjZORNJLrW/wFl24IeKizX27ZOIrymBeeFo9hm+2F4Hrw VbMw== 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=CnWYMa3wK7SKUq5UyEWaZNOBvUhSOAwKZcJPDEAqqkUxoDRJ2oMZD4+QasvN4UvZbh FGqij1ou8BPIv+rLinB9ftbzbNh7NxXmd9985U3lQRwBde8p7HQmZcFxIigWCpZFjf7N PSafZI+oghFjEegn6H8fyp7IQ2EmXjT4m9VqB4YTC1W40PUo5/RO6vfwm/lwH1htsAHW O09nZk4zFwCm4GNSzIz3KGjxr/do2kG4/Gh6uZpRoMlJx2ZZQofc0mBW1yU+DtgTv5Rj 5fa2mULJ29+SldNyXsUFGPKrlw1WlLnZIavJ4dVG5p1MqwYKWKrIf9pR3utcvzy0bkhc xD1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ii5G+Epa; 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 nd39-20020a17090762a700b00706fe017e89si5880448ejc.880.2022.08.15.16.23.53; Mon, 15 Aug 2022 16:24:18 -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=ii5G+Epa; 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 S1347563AbiHOVcT (ORCPT + 99 others); Mon, 15 Aug 2022 17:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348463AbiHOV1n (ORCPT ); Mon, 15 Aug 2022 17:27:43 -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 45AF2EC4C0; Mon, 15 Aug 2022 12:23:29 -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 C710A60EF0; Mon, 15 Aug 2022 19:23:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFD87C433C1; Mon, 15 Aug 2022 19:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591408; bh=0e2tt6DrrV1ZWC1oY7l9p4t3b8AMy0FXCj2qQ2cAlz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ii5G+EpaBg00VE53QV1OwmgC3qGddOo+wQQOofz11SOn6Gf1DPeSdlhipYMG+kg/V NNVCZsdwrtd/ajte/wSF2T687j/TtAcC0iNnaANZHMnIChETpzQJSOiVU8GUFHsPEY TNI+WYTLL+n21i5vqDvrlRxuvBXQCHt2Pf8coyV8= 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.18 0569/1095] usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe Date: Mon, 15 Aug 2022 19:59:28 +0200 Message-Id: <20220815180453.109474821@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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