Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3409712rwa; Tue, 23 Aug 2022 04:25:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR5cYU+X1site40yIkuqSnSUKitDLfa24V6bPQOxMpo5cUuOzY3+eMglxiTiVDTaWOryNwuW X-Received: by 2002:a17:903:286:b0:172:fa5b:d18f with SMTP id j6-20020a170903028600b00172fa5bd18fmr4649125plr.51.1661253935310; Tue, 23 Aug 2022 04:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253935; cv=none; d=google.com; s=arc-20160816; b=0WMqxZiayuX0suJ31ucne3NModPZs5VN8SoVszulWSvojpLa7jdmpWtxx913hqAGrd pL8L/o7hy2LlEWYuIhJYrdN6TlZMXLzBvyfATiIHj8pVvI8zJX1quizLpP4w/mC7jvP2 4pUTQNqaC+7bawCOWEatDD3tyUIF0enUAEIBAtux9X6EboTuzmRXfoNmStWvsRjwQEBR vLIFsUir9MZTLdrMYTHW9MTvd8F2GYhnJ6QxtFg/SHn6NtONvb7usTKH2sqDUV2LSz2F DirSaFrZilejaZX1br/7pe2NMJ4Y1F6iSCWehXDo1CN+fp47gbdHLqSQZDYGCK02DM2a cfoQ== 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=cvF9aDdbsGcd1k8UyrkqR3RnKIwuqP5YHNL66PocEco=; b=B4O3SVSc3SqhS5HaucXTCBvKCAXwtOEd6hOGe04s5EjPH7xk18r+CiFJg6woGJ8O34 Q3wrneYsIh5myCfRjwTErCyfzZYc1K4mWV3AZ99JqpZOwhBqufi+7iC5NSIvnNuSVNO7 888b34nHJ/WSKtSfyKb8IrbGLfSVgKmKx/2hCJqzhg/H2x7qmaazWPAFh15uvOIW1yxS yz3Rd3R56JOLDB6WA4Z0QJvgVqKSjJtIwLD7IRRpnIR4JQ6MUTyAQQiqlwaCkG2cCER5 VmU7xYiyul+jnzCK+RCeKB74dGhID/0PSRfMEUfN1KBWKruhDVfb6x6qFC50mJDHLrgy 8XYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pFTfJYAB; 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 v70-20020a638949000000b0041ce068604csi15162310pgd.763.2022.08.23.04.25.22; Tue, 23 Aug 2022 04:25:35 -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=pFTfJYAB; 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 S1356352AbiHWKmC (ORCPT + 99 others); Tue, 23 Aug 2022 06:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354779AbiHWK3R (ORCPT ); Tue, 23 Aug 2022 06:29:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 394B8844EE; Tue, 23 Aug 2022 02:06:16 -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 721E3B81C86; Tue, 23 Aug 2022 09:06:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E7B1C433C1; Tue, 23 Aug 2022 09:06:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245573; bh=JE7U2DwI2Vi5ZdWxe9WFbt81QvbcBOFm9AeVIF6LAMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pFTfJYABQwe/+V60Ca/W68PFqSexp7HHap07P0fvb/C/4t09sZoGZS48sh7QidgRw /d8E1y26S0iLzjX4Q9zIGun/66Jaq3/lP4V4Nt8Xz0JkxUdlVuOz4qxQbYMYOEyz3+ XwvxyxTXfc0MEZG2bXfp8vYhUTggnlo/VGDDQXS0= 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.19 121/287] usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe Date: Tue, 23 Aug 2022 10:24:50 +0200 Message-Id: <20220823080104.469135781@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@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 302970b4cad3ebfda2c05ce06c322ccdc447d17e ] of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 73108aa90cbf ("USB: ohci-nxp: Use isp1301 driver") Acked-by: Alan Stern Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220603141231.979-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/host/ohci-nxp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c index f5f532601092..a964a93ff35b 100644 --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c @@ -153,6 +153,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev) } isp1301_i2c_client = isp1301_get_client(isp1301_node); + of_node_put(isp1301_node); if (!isp1301_i2c_client) return -EPROBE_DEFER; -- 2.35.1