Commit 07472640 authored by Dan Carpenter's avatar Dan Carpenter Committed by Thierry Reding

pwm: omap-dmtimer: Potential NULL dereference on error

"omap" is NULL so we can't dereference it.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 36d5be4b
...@@ -243,7 +243,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev) ...@@ -243,7 +243,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
omap = devm_kzalloc(&pdev->dev, sizeof(*omap), GFP_KERNEL); omap = devm_kzalloc(&pdev->dev, sizeof(*omap), GFP_KERNEL);
if (!omap) { if (!omap) {
omap->pdata->free(dm_timer); pdata->free(dm_timer);
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment