projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2245e3c
)
ASoC: ab8500: Add missing of NULL check of devm_kzalloc()
author
Takashi Iwai
<tiwai@suse.de>
Wed, 30 Oct 2013 07:34:59 +0000
(08:34 +0100)
committer
Mark Brown
<broonie@linaro.org>
Wed, 30 Oct 2013 16:33:30 +0000
(09:33 -0700)
Spotted by coverity CID 712316.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/ab8500-codec.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/ab8500-codec.c
b/sound/soc/codecs/ab8500-codec.c
index
7f6ca11
..
10be4cb
100644
(file)
--- a/
sound/soc/codecs/ab8500-codec.c
+++ b/
sound/soc/codecs/ab8500-codec.c
@@
-2570,6
+2570,8
@@
static int ab8500_codec_driver_probe(struct platform_device *pdev)
/* Create driver private-data struct */
drvdata = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_codec_drvdata),
GFP_KERNEL);
+ if (!drvdata)
+ return -ENOMEM;
drvdata->sid_status = SID_UNCONFIGURED;
drvdata->anc_status = ANC_UNCONFIGURED;
dev_set_drvdata(&pdev->dev, drvdata);