projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b787f68
)
ASoC: mop500_ab8500: Add a NULL pointer check in mop500_ab8500_machine_init()
author
Rajan Vaja
<rajan.vaja@gmail.com>
Wed, 20 May 2015 04:50:54 +0000
(10:20 +0530)
committer
Mark Brown
<broonie@kernel.org>
Thu, 21 May 2015 11:05:48 +0000
(12:05 +0100)
Avoid possible crash (NULL pointer dereference) by making
sure that dem_kzalloc() is successful.
Signed-off-by: Rajan Vaja <rajan.vaja@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ux500/mop500_ab8500.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/ux500/mop500_ab8500.c
b/sound/soc/ux500/mop500_ab8500.c
index b81a7a4c938b80e7f1eb43c2e3cfc56b4aa4488a..85d810d7667c1992d53a032c203ecf4631ac88f7 100644
(file)
--- a/
sound/soc/ux500/mop500_ab8500.c
+++ b/
sound/soc/ux500/mop500_ab8500.c
@@
-372,6
+372,10
@@
int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd)
/* Create driver private-data struct */
drvdata = devm_kzalloc(dev, sizeof(struct mop500_ab8500_drvdata),
GFP_KERNEL);
+
+ if (!drvdata)
+ return -ENOMEM;
+
snd_soc_card_set_drvdata(rtd->card, drvdata);
/* Setup clocks */
This page took
0.024967 seconds
and
5
git commands to generate.