Commit 1c16071a authored by Dan Carpenter's avatar Dan Carpenter Committed by Tim Gardner

pwm: omap-dmtimer: Potential NULL dereference on error

BugLink: http://bugs.launchpad.net/bugs/1520436

"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>
(cherry picked from commit 07472640)
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 6a9557d0
......@@ -243,7 +243,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
omap = devm_kzalloc(&pdev->dev, sizeof(*omap), GFP_KERNEL);
if (!omap) {
omap->pdata->free(dm_timer);
pdata->free(dm_timer);
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