[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211213020507.1458-1-linmq006@gmail.com>
Date: Mon, 13 Dec 2021 02:05:07 +0000
From: Miaoqian Lin <linmq006@...il.com>
To: digetx@...il.com
Cc: jckuo@...dia.com, jonathanh@...dia.com, kishon@...com,
linmq006@...il.com, linux-kernel@...r.kernel.org,
linux-phy@...ts.infradead.org, linux-tegra@...r.kernel.org,
thierry.reding@...il.com, vkoul@...nel.org
Subject: [PATCH v2] phy: tegra: xusb: Fix return value of tegra_xusb_find_port_node function
callers of tegra_xusb_find_port_node() function only do NULL checking for
the return value. return NULL instead of ERR_PTR(-ENOMEM) to keep
consistent.
Signed-off-by: Miaoqian Lin <linmq006@...il.com>
---
drivers/phy/tegra/xusb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 963de5913e50..aa5237eacd29 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -455,7 +455,7 @@ tegra_xusb_find_port_node(struct tegra_xusb_padctl *padctl, const char *type,
name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
if (!name) {
of_node_put(ports);
- return ERR_PTR(-ENOMEM);
+ return NULL;
}
np = of_get_child_by_name(ports, name);
kfree(name);
--
2.17.1
Powered by blists - more mailing lists