You need to sign in or sign up before continuing.
提交 eedc49b0 编写于 作者: S sanglipeng1

phy: tegra: xusb: Fix return value of tegra_xusb_find_port_node function

stable inclusion
from stable-v5.10.169
commit 045a31b9
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6IXQP
CVE: CVE-2023-23000

Reference: https://github.com/torvalds/linux/commit/045a31b95509c8f25f5f04ec5e0dec5cd09f2c5f

--------------------------------

commit 045a31b9 upstream.

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: NMiaoqian Lin <linmq006@gmail.com>
Acked-by: NThierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20211213020507.1458-1-linmq006@gmail.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
上级 8e2491eb
...@@ -449,7 +449,7 @@ tegra_xusb_find_port_node(struct tegra_xusb_padctl *padctl, const char *type, ...@@ -449,7 +449,7 @@ tegra_xusb_find_port_node(struct tegra_xusb_padctl *padctl, const char *type,
name = kasprintf(GFP_KERNEL, "%s-%u", type, index); name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
if (!name) { if (!name) {
of_node_put(ports); of_node_put(ports);
return ERR_PTR(-ENOMEM); return NULL;
} }
np = of_get_child_by_name(ports, name); np = of_get_child_by_name(ports, name);
kfree(name); kfree(name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册