Skip to content

Commit

Permalink
phy: tegra: xusb: Fix return value of tegra_xusb_find_port_node function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yuuoniy authored and vinodkoul committed Dec 14, 2021
1 parent e87f13c commit 045a31b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/phy/tegra/xusb.c
Expand Up @@ -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);
Expand Down

0 comments on commit 045a31b

Please sign in to comment.