From 074726402b82f14ca377da0b4a4767674c3d1ff8 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 21 Dec 2015 16:13:04 +0300 Subject: [PATCH] pwm: omap-dmtimer: Potential NULL dereference on error "omap" is NULL so we can't dereference it. Signed-off-by: Dan Carpenter Signed-off-by: Thierry Reding --- drivers/pwm/pwm-omap-dmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c index c453b3360605..826634ec0d5c 100644 --- a/drivers/pwm/pwm-omap-dmtimer.c +++ b/drivers/pwm/pwm-omap-dmtimer.c @@ -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; } -- 2.34.1