pwm: omap-dmtimer: Potential NULL dereference on error
Subsystems (2)
PATCH 1/1 pwm: omap-dmtimer: Potential NULL dereference on error
"omap" is NULL so we can't dereference it.
Signed-off-by Dan Carpenter <[email protected]>
---
It's weird that request_by_node() and free() are allocate/free pairs. Also this was Thierry's last minute tweaks mentioned in the changelog, Neil Armstrong is innocent. :P
drivers/pwm/pwm-omap-dmtimer.c +1 -1
@@ -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 ; }
Quoted 7 lines · Dan Carpenter
"omap" is NULL so we can't dereference it.
Signed-off-by Dan Carpenter <[email protected]>---
It's weird thatrequest_by_node()andfree()are allocate/free pairs. Also this was Thierry's last minute tweaks mentioned in the changelog, Neil Armstrong is innocent. :P
Applie, thanks.
Thierry