Skip to content

Commit

Permalink
pwm: omap-dmtimer: Potential NULL dereference on error
Browse files Browse the repository at this point in the history
"omap" is NULL so we can't dereference it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Dan Carpenter authored and Thierry Reding committed Jan 4, 2016
1 parent 36d5be4 commit 0747264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pwm/pwm-omap-dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0747264

Please sign in to comment.