diff options
author | Arvind Yadav | 2017-09-20 15:36:11 +0530 |
---|---|---|
committer | Mark Brown | 2017-09-21 15:56:03 +0100 |
commit | 94a6a8e8b57a8ece33b97a6dfc5f7eae61ff96f8 (patch) | |
tree | 734e30fce588a8021c1b6ec4495c4eef48779f48 /sound/soc/omap | |
parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (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>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r-- | sound/soc/omap/omap-hdmi-audio.c | 3 |
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); |