Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3408249rwa; Tue, 23 Aug 2022 04:24:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR7HkCnGK0NXgDg1p+Z98QAYNaemdFNfasGb1KxPpw/jviyyfTjD147O9IqBNhsM8dGKxqva X-Received: by 2002:a17:90b:3d90:b0:1fb:151b:b5cb with SMTP id pq16-20020a17090b3d9000b001fb151bb5cbmr2907888pjb.210.1661253845511; Tue, 23 Aug 2022 04:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253845; cv=none; d=google.com; s=arc-20160816; b=aKS5hmgUoRnZ+U4y9cFtPWmf1RBncDB134u72WTXjk6iSR+Vg9RhZBL/ZIzQ/OY/iH W5zeDRJZroM7/C3b3gK5JngQySFnKSU5SOUDiR8XVdb462elFdqaXj6P1qv+BAavBG3m g8yM0hyzN/rFtEpr1yptlBVQIPOc1tDRdLDBgQYawes2CMvsX8n4EnYKYECyMK1jti1S Z5nZv3ouZVtWNOuPwbbRkzmF4b/Gp/GH0k1/egMcaE7OIrWT/NcMZttEDrx0pHZ8Lw/s 7E8Qadbj4rm7Ql8CV5EK9i3S4N/CXjkjLH6OAnVCIonZEuY6l0qjXRMu3rAO3hhsXz0U GohA== 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=8jP5syFD27cNSOVu9DMU9yElA7Nypyv819CQXAOffn8=; b=xMzt4IH5KtYjMCFWR3PAsE2LMNgQ/hcVRt/c+/aYM5cCfwaDB3pUOBHfaHKXz16QSD 398XMwFPyk6f3gmaXRKfohnua75xeJm6um3ZjMWfcl3UG/DvQfr5dkf4WJOO4+46qZVJ N9Unc8RO/6GsepLGxA4xS3z2O+iS5hz+k16QEbi67ys6rpVBElcqiGYGQpUViWXYYZel I833qGeK2+L/8bfiTCe96VtxodcMAdsnTSu2fZ/WL7Mf8Ud6Msg3H8wwKVIAdrW9xhsS cZEAdA9Q3BhiL+cvy7bHbCz4iAxZGslJ48MAlTnL/20o5fCv0el9jKLIV16lTqIydwr7 MbeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RNlkxITg; 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 n13-20020a17090a670d00b001e895fed1e2si17233096pjj.130.2022.08.23.04.23.54; Tue, 23 Aug 2022 04:24:05 -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=RNlkxITg; 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 S245598AbiHWJzb (ORCPT + 99 others); Tue, 23 Aug 2022 05:55:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244585AbiHWJyB (ORCPT ); Tue, 23 Aug 2022 05:54:01 -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 4CA989F768; Tue, 23 Aug 2022 01:46:24 -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 BA3A9B81C3A; Tue, 23 Aug 2022 08:46:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC362C433D6; Tue, 23 Aug 2022 08:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244366; bh=d2C7zI3JOKJ5MqjkH9tUElWe9uYNhh5//9mKAug5n1Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RNlkxITg5y66poxcGI3QO3IbDRQ93/3HTwzrdF+kL1bAGfCAi+SCDWvxYi+PfQaH5 zEmeRzbxUq9QxfVSQa+EwP9S61DmYEargZ/DcjXXDk+TIiI+uXXQ3/IHkUdzDBx9bz 4M57Uy6MKuyCl/BKwuHtYrkngNTbC/qrGBKx5mdY= 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 4.14 099/229] usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe Date: Tue, 23 Aug 2022 10:24:20 +0200 Message-Id: <20220823080057.231944046@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: 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 1a10c8d542ca..d36aa2c29d39 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c @@ -147,6 +147,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