Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3486096rwa; Tue, 23 Aug 2022 05:40:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR4PP5XS1L9yorasJybSOV6JoOXNpmgRFDvaB5XSmNq52Vl9AtcsG/9k57ZfGUzyqnKW3gkp X-Received: by 2002:a17:906:eeca:b0:730:6880:c398 with SMTP id wu10-20020a170906eeca00b007306880c398mr16751645ejb.706.1661258420947; Tue, 23 Aug 2022 05:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661258420; cv=none; d=google.com; s=arc-20160816; b=s7xHkkEE8zBLuPFdTos1jmqrojQVkjssnFkBTBbR+VGdO/TpwiB1xcZwt1FsDj4EHp hkrVnQEG07pxz1X40Hs5f2Nh1U8GJBbuLGJsswSJy6u1X94Va98TJdEgsiBA1jidAC4g KxwWjbgIa+4mLrJz/pX4K1FPqWX+TCb6hgIE2VekZHrGDhPgaGJeTanZBfLefZGVY1Yp z3hS1HSadxiCBmJaVkxe+50bZ3gn//Su9gOUkn82IXWOAU03OtQRF4gNeUJL9S4LEgYH PO8MPktbeDUm7hTCuTyVvl0TnYveQIIPs+1yGa6+7zQdf8mQmowAEQLhLrmeA08jaFvf OcTg== 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=R/NCQHclDB+o+wVsqDol8MEXEfBC3mYHYBUuxGC5wgM=; b=PKpCmP5mxoy/EfQEU8OvU78EQagGNhZ1VhV44CjLA639PJORaXFzdgEYq7P6SXWIqs x6m7Jf1newC5cwMkDo9pZTRDbfKVgwWzo3tuRM4RIdeyv1cm1c0qIh6NafOEysqQHS+a wrPsi2iXf/UwvdFIpEhy8HjXnIUfHNBK058OtB1DJNA5Rb8g+ZZC5GXCnVUeiORLBv+t PhGSK7kh3K/JqrpCKGUavBO7qW/kAzcxrfxpv4GgMp0fsbuvKH9ZNkJs/sgSDJ+nb/7z yIPLVB+MxCBXNCBaDJAMJ6pXOStZb/aF30Bfjp9umff5Dnrr5eComtxlXnjfjFgvE/Mr 7eNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xoOuNNbL; 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 t29-20020a50ab5d000000b0044691fbf10dsi1769474edc.117.2022.08.23.05.39.53; Tue, 23 Aug 2022 05:40:20 -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=xoOuNNbL; 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 S1358993AbiHWL6U (ORCPT + 99 others); Tue, 23 Aug 2022 07:58:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359101AbiHWL4O (ORCPT ); Tue, 23 Aug 2022 07:56:14 -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 054917DF4C; Tue, 23 Aug 2022 02:33:41 -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 7B95260F85; Tue, 23 Aug 2022 09:33:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83240C433C1; Tue, 23 Aug 2022 09:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661247214; bh=0LLFBfOKHFPod6bxQlh8610jSWOZ/Fs0Wgi1kYBiWWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xoOuNNbLdWURfSDcugxv/+SaXmUeLUdGVrlbx5GAukIzgQG4sPA6MGXHyBMZH57PW Ljm/sBOuTfffFmaHhDT9ceu3qVoJ27tu5teEoRPqt13D49ryuJrdDY3umeUTVLQswO rBGFmgJGoD3m4VBA4d1EFVs+LmrUBhNK/NptBRxM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Stern , Liang He , Sasha Levin Subject: [PATCH 5.4 354/389] usb: host: ohci-ppc-of: Fix refcount leak bug Date: Tue, 23 Aug 2022 10:27:12 +0200 Message-Id: <20220823080130.341726434@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080115.331990024@linuxfoundation.org> References: <20220823080115.331990024@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: Liang He [ Upstream commit 40a959d7042bb7711e404ad2318b30e9f92c6b9b ] In ohci_hcd_ppc_of_probe(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Acked-by: Alan Stern Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220617034637.4003115-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/host/ohci-ppc-of.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c index 45f7cceb6df3..98e46725999e 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c @@ -169,6 +169,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op) release_mem_region(res.start, 0x4); } else pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__); + of_node_put(np); } irq_dispose_mapping(irq); -- 2.35.1