summaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2021-12-13 03:05:07 +0100
committerVinod Koul <vkoul@kernel.org>2021-12-14 08:37:21 +0100
commit045a31b95509c8f25f5f04ec5e0dec5cd09f2c5f (patch)
tree2fda40d08c7286af75c8770bef4ba9cdd1b5d96e /drivers/phy
parentphy: qcom: use struct_size instead of sizeof (diff)
downloadlinux-045a31b95509c8f25f5f04ec5e0dec5cd09f2c5f.tar.xz
linux-045a31b95509c8f25f5f04ec5e0dec5cd09f2c5f.zip
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@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20211213020507.1458-1-linmq006@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/tegra/xusb.c2
1 files changed, 1 insertions, 1 deletions
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);