projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bd6bf0
)
ASoC: omap-hdmi-audio: Handle return value of devm_kasprintf
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Wed, 20 Sep 2017 10:06:11 +0000
(15:36 +0530)
committer
Mark Brown
<broonie@kernel.org>
Thu, 21 Sep 2017 14:56:03 +0000
(15:56 +0100)
devm_kasprintf() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/omap/omap-hdmi-audio.c
patch
|
blob
|
history
diff --git
a/sound/soc/omap/omap-hdmi-audio.c
b/sound/soc/omap/omap-hdmi-audio.c
index 3e9cc4842a1db14c2e8b0dc0a60dd462305f07aa..8eeac7cab1c1945742c5307d8b40b05f63842bfe 100644
(file)
--- a/
sound/soc/omap/omap-hdmi-audio.c
+++ b/
sound/soc/omap/omap-hdmi-audio.c
@@
-362,6
+362,9
@@
static int omap_hdmi_audio_probe(struct platform_device *pdev)
card->name = devm_kasprintf(dev, GFP_KERNEL,
"HDMI %s", dev_name(ad->dssdev));
+ if (!card->name)
+ return -ENOMEM;
+
card->owner = THIS_MODULE;
card->dai_link =
devm_kzalloc(dev, sizeof(*(card->dai_link)), GFP_KERNEL);