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>
This commit is contained in:
Arvind Yadav 2017-09-20 15:36:11 +05:30 committed by Mark Brown
parent 2bd6bf03f4
commit 94a6a8e8b5
1 changed files with 3 additions and 0 deletions

View File

@ -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);