diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-30 08:34:59 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-30 09:33:30 -0700 |
commit | 00ecdd93a80fda1336bf5413b1d705c742a5b598 (patch) | |
tree | db264c24a70c1bb69e4867b5554d7988d814f480 /sound/soc/codecs/ab8500-codec.c | |
parent | 2245e3c31c15c2d2a26926c4b734f4d3a37ae252 (diff) | |
download | op-kernel-dev-00ecdd93a80fda1336bf5413b1d705c742a5b598.zip op-kernel-dev-00ecdd93a80fda1336bf5413b1d705c742a5b598.tar.gz |
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 7f6ca11..10be4cb 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) /* 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); |