Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3414952rwa; Tue, 23 Aug 2022 04:31:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR4C+C2kJm14pq2Ot4HXZ1VHeuT7VrV0dGseizPtBw1srr/e1Nezxtf0UZ3mag6cVC8Y/U8O X-Received: by 2002:a05:6402:138f:b0:43d:8ed5:c841 with SMTP id b15-20020a056402138f00b0043d8ed5c841mr3385020edv.27.1661254264369; Tue, 23 Aug 2022 04:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661254264; cv=none; d=google.com; s=arc-20160816; b=hubVORtQsRgNS7T+nS7aGPnRxInCYPJvbwzRFkWUAMYzXaOg83vRLuNwQni5GnyK1w s4LTzV8/MN89A829x67NeRib+Bi29XtnztvFRYsLD/PaeuhZ4ZAUVTTnQlanbBDcPJdu Xu05QBVqsP/Q2nPz2aZRTUBaSSg7TnPca9/goawvr8tc9gQNDkY/EsMV7hU1XIs8jVzm 1w13YuOrl5+yP2crf3SnGjmbaTanOG4fUBXOzluFbnL0tKEXXwbGmOosmdD9IBCJZaZH opT1bAhPsFwC0uc/0zcmm8YZ7ND7kJcKwcX2LzZLXQbzL3MiMGUYFs8xSMQr5K6uYC83 w6mQ== 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=k2L5MYpZOE/+D97I9oYUHBiBb6qbgnNffmK6hg2qF8A=; b=doRKGNAVUQh0n4aDnElzFH3tOBrnIwOqqGk/chSZ25lOZ/UF4DSHDZ+8de0zikG/C3 pLA1fEafhv1keCeSEEV29BHpZopPORdOGdgFFfDCi3wQKghppyU/tQaOBJVGbB2IL7Vl PBSQARgCXe67xhykHQoEr91ezFTcF7XeVPrnMd5asyLFCyGHjKZcUjMbsJ1vI4pmgLPX ht5hWv5OtZwQLCLm0/b3DgGYe4G6puoCQa/6MAjIvhLc8/u4VPjClvorcHVseqidFZTb JS7JUd8xdOdK5VFo43k4iZh4UhZYlPYnalXxJ3WkjpjRxRfI24L0+d8hgPDDc2iBB0WD iLrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EXETc7c+; 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 hg4-20020a1709072cc400b0073cfa9b4286si9989911ejc.648.2022.08.23.04.30.38; Tue, 23 Aug 2022 04:31:04 -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=EXETc7c+; 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 S1345002AbiHWJ6a (ORCPT + 99 others); Tue, 23 Aug 2022 05:58:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244207AbiHWJxQ (ORCPT ); Tue, 23 Aug 2022 05:53:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C52C9E2D1; 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 dfw.source.kernel.org (Postfix) with ESMTPS id 6A8A8611DD; Tue, 23 Aug 2022 08:46:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8087C433C1; Tue, 23 Aug 2022 08:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244382; bh=TXrm5cDzcDDv4OSzZzYE5SgfVG6S5vhOnAgTDnaow9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EXETc7c+0UjsHsjRht/JXpVT+J0nIukh9MFBUYSytP6WJSLDe3CtsptGB/J1dWhuI l9TOs5qEBH38opCtothY6vhaNrVsagxxk3DurGR68MsBjiGNDiFGNNHs4jGbERt5L1 cl4WhVrb2uAe+D3rg6N06fPIlUMrFjh1IAO2D/ak= 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 100/229] usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe Date: Tue, 23 Aug 2022 10:24:21 +0200 Message-Id: <20220823080057.274538251@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 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 6df8e2ed40fd..5162038b794e 100644 --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c @@ -155,6 +155,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