Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1884790rwb; Fri, 19 Aug 2022 11:02:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR63KFFICeosDBIJWC57ydFXbI2HgmjmNdXlf3mAK7LImmfiLMS6w3Qhhl6aQr599zVztJZ3 X-Received: by 2002:a17:90b:380d:b0:1f5:2c6d:7de8 with SMTP id mq13-20020a17090b380d00b001f52c6d7de8mr15061489pjb.18.1660932179472; Fri, 19 Aug 2022 11:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660932179; cv=none; d=google.com; s=arc-20160816; b=EqSQhCwc/3SQVsXAOAc3o1cMxbT6PS+pgG69oYV5CFj7O9UQdDBXWQpuU44qKjRfq6 m0mbZXlAeDFzej7XCMmwZGcoCxXxYJKcnNSF3OIazJtpJ7tzct7hhxjzZZQ4sobWf+GU WIJbqvdOgQDpd8ldGKszzvgvCKz4eB7XyLkgfufQrp7DHWW9JujV2f7WtlT99V47pqPQ 3JpId0PeA0WWsieyOK+W68LBN9lbvshULm0M7vr8GugOU+eytpt6RxyO2xO19fmelJc7 gx1Yi2Cz/3JA1dbr3ydvsN1T7uc3RgcA93kDkb8pRQyNLW/kJE45PaLP7wFTB6xv3gWd dcPw== 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=KN80n8lricORZ3ltoOu6p1rcQB+f1A9EZWLWfBh3/rSA3xXs9aVVLApBg/1Ryyk/U1 QPzRBFd0YOpKv03uoOhL5RbOi9tY/RvUBV6Zwhmn7Ik2s54wLIcCXC6g736YD+13XM+F px1hSTgXCwkEEfi4KCuIvtOMPduJar+0yVQUmDuC9UxedhPXaPOmHkUs6SgE1BYgc2kW Y6y5cwMQKCB8r6QTC1EIU8Y7AxYf9i0QffRBNUZeoc5FTknlhexVOxB+qFnzxq5lYkuw H2CMiaT0H8c2rXrjsBk6tq4XzFTITt6EZG1TUVBqCqw41+URrbRLhBaTMHEJKsRVLJhF cRNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JfUlF7ME; 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 pi17-20020a17090b1e5100b001eae73fd7f3si7838389pjb.107.2022.08.19.11.02.47; Fri, 19 Aug 2022 11:02:59 -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=JfUlF7ME; 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 S1352466AbiHSQWx (ORCPT + 99 others); Fri, 19 Aug 2022 12:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352747AbiHSQRm (ORCPT ); Fri, 19 Aug 2022 12:17:42 -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 23E30109754; Fri, 19 Aug 2022 09:00:47 -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 D385F616B3; Fri, 19 Aug 2022 16:00:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDE51C433D7; Fri, 19 Aug 2022 16:00:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924831; bh=0e2tt6DrrV1ZWC1oY7l9p4t3b8AMy0FXCj2qQ2cAlz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JfUlF7MEBvnKrfyFg7ENCE65p6BYiEzLZimK2hh3PgYLrD7x2vNlZ6gLhn7p8wdon 6xlRyeg2U1L6CoPAMi0Udnp+LJUtNuz0JSghB+pxxJBC2KpTXxviU3VFuQJfnl7KPL H1HGsGvlFlv7YKsQdoMfVhMvszjSHJHHXUDSjBic= 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.10 279/545] usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe Date: Fri, 19 Aug 2022 17:40:49 +0200 Message-Id: <20220819153841.806039983@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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