summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-09-20 12:06:11 +0200
committerMark Brown <broonie@kernel.org>2017-09-21 16:56:03 +0200
commit94a6a8e8b57a8ece33b97a6dfc5f7eae61ff96f8 (patch)
tree734e30fce588a8021c1b6ec4495c4eef48779f48 /sound
parentLinux 4.14-rc1 (diff)
downloadlinux-94a6a8e8b57a8ece33b97a6dfc5f7eae61ff96f8.tar.xz
linux-94a6a8e8b57a8ece33b97a6dfc5f7eae61ff96f8.zip
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>
Diffstat (limited to 'sound')
-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)
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);