Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3321747rwa; Tue, 23 Aug 2022 02:48:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR4n2yat9bHfImLKk86ufmc8h/k7lDBH0slQ6g8cebRqlksCcbCQ+uhzuih3PQLL5JneKRDb X-Received: by 2002:aa7:d3ce:0:b0:446:82f:eda4 with SMTP id o14-20020aa7d3ce000000b00446082feda4mr2885377edr.327.1661248099695; Tue, 23 Aug 2022 02:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661248099; cv=none; d=google.com; s=arc-20160816; b=SyMw++iuaxTkcbc59m4F5FV+FwvkiwuetQD4Fu1MwSHUpRSDrtJKa6gWEDOtYtN5Z6 YOqfwTsglhVpB8kmfa3rTqkk7QSvODFW/RyU7S6RVl3DcsbFe3uUKVDzPHjNkB5ESgLf KVHxVbpCeS/n0Sxjb6oftLlF1KQ2UbucCWEs0u4Xr/+HVaP6UBQYVAIAy6pPZcCb2A5V SC9uTkIEsdTryTDuTIxD2kSxZBqEr0CTY9n0lfnw8zi+jZS91SGqXtBZR6dhThSFqqgO husJ03yJUlSS/QU/RoKR/nOW4klB2IpMAv89ZNUf+F15qKCrE6d6pWVQE2iktEfrUM+A 7fhA== 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=lAnclq1c6igRDPvKrCaqa3cIcVs3CF3X063MMxNX0Gg=; b=axN1RLLd2+KMM+J5U+OhIIOTqLiZZMfg+iYE1hhS6O+tQ+JvRlDNrNmlkzr8zbA+Rb ASEgPUq+X2IMFvv2GvAP3VbrdbXEALVgkzft35UI7wxfaaA4eT6LO0pTkcJxEfdapCX5 vBBlPll1g/Jh21wwK7LhxWcvw5OChcTq9AROqro8Chl0Nguf0dhPOPFgU7jW59wfzm9P HbNIbp49QQwzcuyIWabPo1sN0K4lJeyTCnY8isvlot3C5WljnTSa0J6My2UfRNAWI/WJ EBkfoSmP/xxsiRXfHu1S3cIYbuUGkOdF95ET8XLkMkgd1aXGDsoqFNS0GFFuKS0Tg+ZC 2Vjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Sy3qWYjl; 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 s1-20020a17090699c100b0073c1d6b30fbsi13994162ejn.355.2022.08.23.02.47.53; Tue, 23 Aug 2022 02:48:19 -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=Sy3qWYjl; 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 S241613AbiHWJNX (ORCPT + 99 others); Tue, 23 Aug 2022 05:13:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348692AbiHWJKg (ORCPT ); Tue, 23 Aug 2022 05:10:36 -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 DA64686B72; Tue, 23 Aug 2022 01:31:15 -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 496ECB81C54; Tue, 23 Aug 2022 08:30:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0C69C433D6; Tue, 23 Aug 2022 08:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243429; bh=GuOmZLylmuX6irrw0+j0dIRNspABPterYfA45dueXJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sy3qWYjlNs+EvObnPY5LoQgxJIAIo/lj/QxeNCNJIoHx4vsrxtuybL1f57dtUwWqR WMHR+LvUp8nMfS+F9PqsOQzhx6TNTRwBByiGM1tZ7ZRuIujAir1sjdrZoDCSY0kJgR OotV4th3wNE1vg3Fgc4xSx6JFRdxIR90O5BPyJc0= 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.19 275/365] usb: host: ohci-ppc-of: Fix refcount leak bug Date: Tue, 23 Aug 2022 10:02:56 +0200 Message-Id: <20220823080129.669683655@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@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 1960b8dfdba5..591f675cc930 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c @@ -166,6 +166,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