diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-30 03:34:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-30 12:33:30 -0400 |
commit | 00ecdd93a80fda1336bf5413b1d705c742a5b598 (patch) | |
tree | db264c24a70c1bb69e4867b5554d7988d814f480 /sound/soc/codecs/ab8500-codec.c | |
parent | 2245e3c31c15c2d2a26926c4b734f4d3a37ae252 (diff) |
ASoC: ab8500: Add missing of NULL check of devm_kzalloc()
Spotted by coverity CID 712316.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/ab8500-codec.c')
-rw-r--r-- | sound/soc/codecs/ab8500-codec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 7f6ca111659b..10be4cbfe969 100644 --- 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) | |||
2570 | /* Create driver private-data struct */ | 2570 | /* Create driver private-data struct */ |
2571 | drvdata = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_codec_drvdata), | 2571 | drvdata = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_codec_drvdata), |
2572 | GFP_KERNEL); | 2572 | GFP_KERNEL); |
2573 | if (!drvdata) | ||
2574 | return -ENOMEM; | ||
2573 | drvdata->sid_status = SID_UNCONFIGURED; | 2575 | drvdata->sid_status = SID_UNCONFIGURED; |
2574 | drvdata->anc_status = ANC_UNCONFIGURED; | 2576 | drvdata->anc_status = ANC_UNCONFIGURED; |
2575 | dev_set_drvdata(&pdev->dev, drvdata); | 2577 | dev_set_drvdata(&pdev->dev, drvdata); |