Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3354761rwa; Tue, 23 Aug 2022 03:27:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR5M1nYMrCQdxBbjjounIUosxtpXKHy0xhMGNyXMz8DS/JpqnzQTbAZc6HCN31UV+sCCDkDr X-Received: by 2002:a17:907:8a07:b0:731:48ba:792e with SMTP id sc7-20020a1709078a0700b0073148ba792emr15855131ejc.397.1661250306720; Tue, 23 Aug 2022 03:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661250306; cv=none; d=google.com; s=arc-20160816; b=QgQiH3GrZHCT9FOE/WJilYxKxsEhwRUOTjcnYZA5YOd5zEWNGJaZ5cGd/exijPWur9 U/VXzvmMNsN3QBFhL88vCuPvJnZxHNQJ38xFKnfldxaTSBR7QdUmBpgD1DInm+blcXtm rZ/icW+4GH+3EVhRf1Vh7iR5IrV5KbXf7CMWFhancUtMPRshwZozd06nfZgzsMK95El7 UFEQiJ9cHYvldPxIKDCzCPI2iZdYNEby65E/PVH5TPSIrTOSsUr+sfEhPqNa5xKPY3q3 50uxsgMm8mk0D6tWa+CfBeQEUmN2ghhgsEQc/gDM9/eveJ74XT/MUDh5S1UT4uY9jdV0 QotA== 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=vjlbQ9NKGv/3BccFdajztY4rht1H2t/zU/wrDmHjMt8=; b=Ki9KtkS6SLAhRO1u2USVumMw31VOjdzCg0nQ/BU7RY+MjYLOaXA2X10P/nfGi/t0uH lc4yQGsstjJ3WF7KZLlViO2caFFkZg+G3I6vUJY1OYDl6ux6mMyyFdojF0cYqtiGxBlL e9FoV0/U9T+4Pl1i4z7nyEeSv8ilDS0lT4CuIwt8L5KG8B3Blmmbq74TjvbMhR0F1yqu CcDExZSsC+5Kpko4ceCWZBDtt5aIVJyJYtYaJ57Hshc5ClRdB2SlimLaDoheWl9y5TBV WNho5CT4+r3/rbqibOCoxfAgq9szVOD/mwVV7kbJ1eqVRKRPaPDD5pf8/6kYl/NwoE/V 9B2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=maxTmvhm; 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 dt20-20020a170907729400b0073d7ce7e954si5948117ejc.695.2022.08.23.03.24.40; Tue, 23 Aug 2022 03:25:06 -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=maxTmvhm; 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 S1354513AbiHWKVk (ORCPT + 99 others); Tue, 23 Aug 2022 06:21:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352921AbiHWKJe (ORCPT ); Tue, 23 Aug 2022 06:09:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2729C53D24; Tue, 23 Aug 2022 01:55:39 -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 ams.source.kernel.org (Postfix) with ESMTPS id DB542B81C35; Tue, 23 Aug 2022 08:55:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2580BC433D6; Tue, 23 Aug 2022 08:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244936; bh=X32xtPBWcVE6Z6gxu3/jbMLK/pP7I1mcOKV4OxfaTWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=maxTmvhmmOBUaFgfuEr1C6DkOvDjS+a0HB4sVe5i9Xq+pvKk3Eb4h3Y/U1jWziOdL DhSVDBCR9/Ha6lIybBh2XEE978U5CEzAeuRWf00lnueSoTirKrfUnnuNQqwsqFG98b YjZEp2bNb7Ks+UWac4Q0TOed3YjUOz8SdPlxLpAk= 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 4.14 214/229] usb: host: ohci-ppc-of: Fix refcount leak bug Date: Tue, 23 Aug 2022 10:26:15 +0200 Message-Id: <20220823080101.279637578@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@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 4f87a5c61b08..d22a70363fbf 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c @@ -168,6 +168,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