projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
758a3b0
)
ASoC: fsl-asoc-card: Handle return value of devm_kasprintf
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Thu, 21 Sep 2017 05:20:03 +0000
(10:50 +0530)
committer
Mark Brown
<broonie@kernel.org>
Thu, 21 Sep 2017 15:20:10 +0000
(16:20 +0100)
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>
sound/soc/fsl/fsl-asoc-card.c
patch
|
blob
|
history
diff --git
a/sound/soc/fsl/fsl-asoc-card.c
b/sound/soc/fsl/fsl-asoc-card.c
index 3772abbdd7b74a3a1908498c84952fa61e3892c4..1225e0399de8193cc5fce40a61e53bba6fc93e07 100644
(file)
--- 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)
devm_kasprintf(&pdev->dev, GFP_KERNEL,
"ac97-codec.%u",
(unsigned int)idx);
+ if (!priv->dai_link[0].codec_name) {
+ ret = -ENOMEM;
+ goto asrc_fail;
+ }
}
priv->dai_link[0].platform_of_node = cpu_np;