aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-09-21 01:20:03 -0400
committerMark Brown <broonie@kernel.org>2017-09-21 11:20:10 -0400
commit7add71b623a2b2abc2e0947a21fb31e2c8f71e18 (patch)
tree29baeee8307237d66b04037e1d82d5bc6ad01d05
parent758a3b0183a83a4827afc892c417cd6f8d12e189 (diff)
ASoC: fsl-asoc-card: 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>
-rw-r--r--sound/soc/fsl/fsl-asoc-card.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 3772abbdd7b7..1225e0399de8 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -639,6 +639,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
639 devm_kasprintf(&pdev->dev, GFP_KERNEL, 639 devm_kasprintf(&pdev->dev, GFP_KERNEL,
640 "ac97-codec.%u", 640 "ac97-codec.%u",
641 (unsigned int)idx); 641 (unsigned int)idx);
642 if (!priv->dai_link[0].codec_name) {
643 ret = -ENOMEM;
644 goto asrc_fail;
645 }
642 } 646 }
643 647
644 priv->dai_link[0].platform_of_node = cpu_np; 648 priv->dai_link[0].platform_of_node = cpu_np;