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>
This commit is contained in:
parent
2245e3c31c
commit
00ecdd93a8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue