Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3254462rwb; Mon, 15 Aug 2022 22:25:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR7zexAll5XMoEC2PSbDcHTvbXej5qN0C2d9nla353iwpuEpGFrC421kjh6GvePjxHw9d2mS X-Received: by 2002:a63:d70c:0:b0:420:f9b6:9c3d with SMTP id d12-20020a63d70c000000b00420f9b69c3dmr16644431pgg.377.1660627506721; Mon, 15 Aug 2022 22:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660627506; cv=none; d=google.com; s=arc-20160816; b=xpHSItMubP0tJngc66yeb/Dpu/MTj+R9uLck4xo/pi/qzaiZwHLqIZkEyZk/nqolPo aPRLvhpyTEiYzNvtR9Q1VDADCl04F4CuVsYm54wheldcCaIlmELW545ay4/+YHywus4D 46THkBlIm6zXhTlZ3FTXk16iLUNQmLD3gqQSIgGvdkjB/nNgEsDjSgoOy4afJgkQtoHr D9zTCw4Hjg6L7oLkErBzJG8act6uQR2BqAJJOOJQje6f7LDI3NmxkanyfKgbwvg59uxq O0W1rW6ILeM1baJeDJuyvmXXoiZjpzM/21/K9hf4XOSXe4CGMP+q+HV4RCS1yURo4y5x PuAQ== 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=zBxbOd875xJu16M5kqCWAiG1LKuOeJzWCm0WhVsiNy0=; b=hNTgTE2O58/izOSfYQruHV6IQffzaeLf9iCuiKF2vWqAKpXYtKaR5DgCJ2TRv8twou +9AMpoNvBPAOKB/sP5Vq7N29CasZUj+fkezX/1Wn5q+rx1/Hbn8zVA/o1ARgJxOLkub4 mpgl9HGEv/F0bISfj6pLtsxfiRg2UfaofV3v7BbJ2oLKKEgqAFqQKYfvG9GCDSqWvLh/ wLUnG4913kTItuMw4Wza5f66+E7tf4ZYMrfzHOj64HwmdinP22YP/bZaIYHyRDW6eCu2 JjpyTQKQS/SMmbdw6Q3pC96aInXPJF/VMZgtf9UgicGWcjCpS7vqm92FrPsJeAbP0bkt OcRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hu+lJKwk; 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 j1-20020a63fc01000000b0041b539aec98si12211077pgi.816.2022.08.15.22.24.56; Mon, 15 Aug 2022 22: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=hu+lJKwk; 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 S229890AbiHPEcR (ORCPT + 99 others); Tue, 16 Aug 2022 00:32:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230034AbiHPEbq (ORCPT ); Tue, 16 Aug 2022 00:31:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8AF7C6B5F; Mon, 15 Aug 2022 13:22:36 -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 10E15B8119B; Mon, 15 Aug 2022 20:22:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6894FC433C1; Mon, 15 Aug 2022 20:22:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594952; bh=bzFVUVkb0hL4tUDIprYYW0i2vps8384MfZ5C8L4/c+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hu+lJKwkGncSz16I0BLe/HI6iKI0XsSVb0+KUgfA9hH95umY61zAdFrzQFjq7R2IM V+sfz4nhrv1NSdY1tSN9nP5TbH1JOcEIJDJKrBO/F8RURGK4sDcFpWOx1goiHgYUBR KOokkS8VsV3x9D/iuncZB7hYaVGpy5/qYRmAqKb4= 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 5.19 0610/1157] usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe Date: Mon, 15 Aug 2022 19:59:26 +0200 Message-Id: <20220815180504.046698561@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 85878e8ad331..106a6bcefb08 100644 --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c @@ -164,6 +164,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