projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c517d83
)
ASoC: simple-card: Add a NULL pointer check in asoc_simple_card_dai_link_of
author
Vishal Thanki
<vishalthanki@gmail.com>
Tue, 3 Mar 2015 13:29:00 +0000
(18:59 +0530)
committer
Mark Brown
<broonie@kernel.org>
Tue, 3 Mar 2015 15:38:41 +0000
(15:38 +0000)
Make sure devm_kzalloc() succeeds.
Signed-off-by: Vishal Thanki <vishalthanki@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/generic/simple-card.c
b/sound/soc/generic/simple-card.c
index f7c6734bd5daee1dafd76ba8b6feafa05b2a6c52..fb550b5869d21f73307d36d2edc88ebcffa61f0c 100644
(file)
--- a/
sound/soc/generic/simple-card.c
+++ b/
sound/soc/generic/simple-card.c
@@
-372,6
+372,11
@@
static int asoc_simple_card_dai_link_of(struct device_node *node,
strlen(dai_link->cpu_dai_name) +
strlen(dai_link->codec_dai_name) + 2,
GFP_KERNEL);
+ if (!name) {
+ ret = -ENOMEM;
+ goto dai_link_of_err;
+ }
+
sprintf(name, "%s-%s", dai_link->cpu_dai_name,
dai_link->codec_dai_name);
dai_link->name = dai_link->stream_name = name;