Commit 94a6a8e8 authored by Arvind Yadav's avatar Arvind Yadav Committed by Mark Brown

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2bd6bf03
...@@ -362,6 +362,9 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) ...@@ -362,6 +362,9 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)
card->name = devm_kasprintf(dev, GFP_KERNEL, card->name = devm_kasprintf(dev, GFP_KERNEL,
"HDMI %s", dev_name(ad->dssdev)); "HDMI %s", dev_name(ad->dssdev));
if (!card->name)
return -ENOMEM;
card->owner = THIS_MODULE; card->owner = THIS_MODULE;
card->dai_link = card->dai_link =
devm_kzalloc(dev, sizeof(*(card->dai_link)), GFP_KERNEL); devm_kzalloc(dev, sizeof(*(card->dai_link)), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment