Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp7039161ioo; Thu, 2 Jun 2022 20:50:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhnh/2X/QsNm59ZWgWItiSeOAM5dDwgoHQ9BNonvciJN33EOlzQn29G7yvttsPJtZSEzmH X-Received: by 2002:a05:6402:43c5:b0:42d:e4f6:d63e with SMTP id p5-20020a05640243c500b0042de4f6d63emr8628930edc.303.1654228239364; Thu, 02 Jun 2022 20:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654228239; cv=none; d=google.com; s=arc-20160816; b=HqsENs9on/hRBS3r4MhZHZMma1onhksuccpZ2MbwSE8XG/2KbAYIXu/3TDXFYecKFK jl/YNt9Ig04JONfKP4uJ02xfVrzeKFSOdfDwQYR/PInf+vl2feAzVs9SSdl2V2RZ3cps tv02ROvP8T0YEAmE8AlksWu08qA3zOVEZbyXxR2p+M66C2BQoT+nVUBOmfdu9F2SDvmD BM/+iSMLHzCPlbHtqF/QAx1bhypbB7mQvSW6vjW/uWZWECymBwntGv7IicUW0i8RMNDd ceJRfTr4cI2X9RxuScN/Nm8oN8JyJGQiwntW3LSW7Y2mFIbT05E8ZqBWqhSpELWuUBA5 BOrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=mINqm7z7d61Ci27W/LY/vStkZjWl6xwQg5HOzLpu2co=; b=Qd2XC6QPY+G45OcBPZuBuqNObYGMlYHoVGwFabGr4UUH9/ZdJYWp3DtH0iZZVW8fox T8Mp1I7S3lHwUkRMcLJr50DrljF4WmaJAS4vgnql30r3Cyr1vk7IYB0WmNb10MkosNNn +XNhCRlzHT1A495LJcgIr8EbSA4YB4NQKvzZ9Z1X3C7BFSBNererHEzUB1h+u8y8O6mS 0C5llB+9miiCvGj3+H9Lh5erDN/T2KpV77ibippXQ1181s2KNraeKsjdzXpJVDsLK2zi WaHTIuVAURNhspMoRrvQpbBZf3+7ycXPAjS7YkK0JQWmRXhl39FPRgAK7L6SlLRBjb85 gbiw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a1709065d0b00b006f39ef3b072si2852303ejt.658.2022.06.02.20.50.14; Thu, 02 Jun 2022 20:50:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235750AbiFBOK5 (ORCPT + 99 others); Thu, 2 Jun 2022 10:10:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235749AbiFBOKz (ORCPT ); Thu, 2 Jun 2022 10:10:55 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 215082A68B0 for ; Thu, 2 Jun 2022 07:10:52 -0700 (PDT) Received: (qmail 268108 invoked by uid 1000); 2 Jun 2022 10:10:51 -0400 Date: Thu, 2 Jun 2022 10:10:51 -0400 From: Alan Stern To: Miaoqian Lin Cc: Greg Kroah-Hartman , Vitaly Bordug , Stefan Roese , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe Message-ID: References: <20220602110849.58549-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220602110849.58549-1-linmq006@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 On Thu, Jun 02, 2022 at 03:08:49PM +0400, Miaoqian Lin wrote: > 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]") > Signed-off-by: Miaoqian Lin > --- Acked-by: Alan Stern > 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.25.1 >