From: Dan Carpenter Date: Mon, 21 Dec 2015 13:13:04 +0000 (+0300) Subject: pwm: omap-dmtimer: Potential NULL dereference on error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=074726402b82f14ca377da0b4a4767674c3d1ff8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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; }