30 Oct
2013
30 Oct
'13
8:34 a.m.
Spotted by coverity CID 712316.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/soc/codecs/ab8500-codec.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index a0394a8f2257..6e3dda1ca734 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c @@ -2575,6 +2575,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);
--
1.8.4.1