mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 18:54:10 +08:00
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:
parent
2bd6bf03f4
commit
94a6a8e8b5
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user