projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bd6bf0
)
phy: tegra: Handle return value of kasprintf
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Wed, 20 Sep 2017 07:05:57 +0000
(12:35 +0530)
committer
Kishon Vijay Abraham I
<kishon@ti.com>
Tue, 26 Sep 2017 11:32:48 +0000
(17:02 +0530)
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>
drivers/phy/tegra/xusb.c
patch
|
blob
|
history
diff --git
a/drivers/phy/tegra/xusb.c
b/drivers/phy/tegra/xusb.c
index
3cbcb25
..
4307bf0
100644
(file)
--- a/
drivers/phy/tegra/xusb.c
+++ b/
drivers/phy/tegra/xusb.c
@@
-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);
}