phy: tegra: Handle return value of kasprintf
kasprintf() can fail and it's return value must be checked. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
parent
2bd6bf03f4
commit
1df79cb3ba
1 changed files with 2 additions and 0 deletions
|
@ -454,6 +454,8 @@ tegra_xusb_find_port_node(struct tegra_xusb_padctl *padctl, const char *type,
|
|||
char *name;
|
||||
|
||||
name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
|
||||
if (!name)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
np = of_find_node_by_name(np, name);
|
||||
kfree(name);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue