aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-09-20 06:06:11 -0400
committerMark Brown <broonie@kernel.org>2017-09-21 10:56:03 -0400
commit94a6a8e8b57a8ece33b97a6dfc5f7eae61ff96f8 (patch)
tree734e30fce588a8021c1b6ec4495c4eef48779f48
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff)
ASoC: omap-hdmi-audio: Handle return value of devm_kasprintf
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>
-rw-r--r--sound/soc/omap/omap-hdmi-audio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c
index 3e9cc4842a1d..8eeac7cab1c1 100644
--- 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)
362 362
363 card->name = devm_kasprintf(dev, GFP_KERNEL, 363 card->name = devm_kasprintf(dev, GFP_KERNEL,
364 "HDMI %s", dev_name(ad->dssdev)); 364 "HDMI %s", dev_name(ad->dssdev));
365 if (!card->name)
366 return -ENOMEM;
367
365 card->owner = THIS_MODULE; 368 card->owner = THIS_MODULE;
366 card->dai_link = 369 card->dai_link =
367 devm_kzalloc(dev, sizeof(*(card->dai_link)), GFP_KERNEL); 370 devm_kzalloc(dev, sizeof(*(card->dai_link)), GFP_KERNEL);