projects
/
linux.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 3cbcb2537657623444c65ab59aa6300b7b66526f..4307bf0013e186cd859b779aaaf4c61ddd662a6c 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);
}