From patchwork Fri Jan 20 08:45:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 46210 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp87463wrn; Fri, 20 Jan 2023 00:54:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXuYqmr1j1DPKMh1NjGpReI3TrPWZXYarrb82WUA93UY06dDpPethJGboqMLcYcVRSRRpzSB X-Received: by 2002:a05:6402:27cf:b0:488:e7ae:5cc4 with SMTP id c15-20020a05640227cf00b00488e7ae5cc4mr18338168ede.41.1674204841010; Fri, 20 Jan 2023 00:54:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674204840; cv=none; d=google.com; s=arc-20160816; b=g6UoKE9QiJSaxtGSZNV5enW8B47NdxIUAi5qnBWzPVKXDaZNEXKGLK/kRtxvkO8OAE VB4xvvRXB1X+nPIec+tGqzZD3aSmOJZ42Vjd3DXx5VFigpQOVoaWj+jhNfJV2JIk4EBN ekpEZA+q8lOak/aJcFbDyjxMJAaRH+3U+PNjF4mcyyNiWzKb07lB1GsXK2ZTEAzlpn/U MWL4FD/YF0As+L+irQacpLoIo33qZmZeHULfihMxALXTNG+grLakCncKYw4NY8eOvN9W ck03xnlIpGjbIu76gmebcWcZEz13oW5U114GDQox2RNTF4K7Kh1aKTbM8OpPBoDrOREW 2xMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=pw/04IuyD67IhEh4H1curGcOoutqf/KXkUecpXZIJYE=; b=SJajk988x6kD3kuh3u1vnFQ4RhMGMS15/r2QdzTKRxmixiYl9/L1qHaIMuHNzc4tQy VMzD2irCzC4vL/ZSWQPVKoRiXy8+LDz2FcglAxY6a6puX9Pfzkj+Ee8/6aws6ge6A9e3 IcSNEPPDD9lEGqoX2+lAS5DqhjKUpnjontSaE1nFHEDOxm/L58ljd/RUh0Ah92Kxf1GG s8vb7XG4vDkwZb7MQQFlS8d2ti7tnNaUkHZb30Uu9qPvCRBMMpxKlIjD47Nx8/1qIgxA m7Pt00eLIIGQeoQ3khcnlmjhDEYExWqX4MVFCKhdDkSu2PdgYEsEROQsb7RigUguaA9Q h2Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=KoFDrV+r; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i13-20020aa7c70d000000b0049eee6721bfsi43386edq.579.2023.01.20.00.53.37; Fri, 20 Jan 2023 00:54:00 -0800 (PST) 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=fail header.i=@mailo.com header.s=mailo header.b=KoFDrV+r; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229596AbjATIqW (ORCPT + 99 others); Fri, 20 Jan 2023 03:46:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjATIqV (ORCPT ); Fri, 20 Jan 2023 03:46:21 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C691E893C5; Fri, 20 Jan 2023 00:46:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1674204355; bh=7AGM/VKSfqplW97tuNvqH0EXLn8mZUwWtDxRa34Qcns=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=KoFDrV+rztzQO41lGqScRZ6OOfndsDmFmN2qTCHs2q4P/8Btth0Khvy0B6GXp+Zny v0lav+iWH4SUM62IHh6tQ/K4b0yB/q8GTQ/C5jZUcH2NtDWwb/2n6P8Tz6nm7pV3jA whxbTlWhmQCY4jmNy0m5Xdah+wP4uoC8ZPWhmXTc= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via ip-206.mailobj.net [213.182.55.206] Fri, 20 Jan 2023 09:45:55 +0100 (CET) X-EA-Auth: AJPgsdx2PiQAxTAi4hOwr9wTl/T18ftrcAb47lbj28zIJ76a3afMdxDqUAIzv5hpOuuyonfCG2kPxLx8+oe/sl1EHuq1bH64 Date: Fri, 20 Jan 2023 14:15:51 +0530 From: Deepak R Varma To: JC Kuo , Vinod Koul , Kishon Vijay Abraham I , Thierry Reding , Jonathan Hunter , linux-phy@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar Subject: [PATCH] phy: tegra: xusb: Release device node reference Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755531015760595215?= X-GMAIL-MSGID: =?utf-8?q?1755531015760595215?= Platform device reference is retrieved using the device node using a call to of_find_device_by_node(). Since we do not need to maintain the device node reference further, we can release it back to the core. Signed-off-by: Deepak R Varma --- Please note: The patch proposal is compile tested using tegra defconfig. drivers/phy/tegra/xusb-tegra210.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/tegra/xusb-tegra210.c b/drivers/phy/tegra/xusb-tegra210.c index ebc8a7e21a31..d30de77515a3 100644 --- a/drivers/phy/tegra/xusb-tegra210.c +++ b/drivers/phy/tegra/xusb-tegra210.c @@ -3169,6 +3169,8 @@ tegra210_xusb_padctl_probe(struct device *dev, goto out; } + of_node_put(np); + if (!platform_get_drvdata(pdev)) return ERR_PTR(-EPROBE_DEFER);