* [patch] pwm: omap-dmtimer: Potential NULL dereference on error
@ 2015-12-21 13:13 Dan Carpenter
2016-01-04 8:00 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-12-21 13:13 UTC (permalink / raw)
To: Thierry Reding, Neil Armstrong; +Cc: linux-pwm, kernel-janitors
"omap" is NULL so we can't dereference it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
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
diff --git a/drivers/pwm/pwm-omap-dmtimer.c b/drivers/pwm/pwm-omap-dmtimer.c
index c453b33..826634e 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] pwm: omap-dmtimer: Potential NULL dereference on error
2015-12-21 13:13 [patch] pwm: omap-dmtimer: Potential NULL dereference on error Dan Carpenter
@ 2016-01-04 8:00 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2016-01-04 8:00 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Neil Armstrong, linux-pwm, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 392 bytes --]
On Mon, Dec 21, 2015 at 04:13:04PM +0300, Dan Carpenter wrote:
> "omap" is NULL so we can't dereference it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> 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
Applie, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-04 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-21 13:13 [patch] pwm: omap-dmtimer: Potential NULL dereference on error Dan Carpenter
2016-01-04 8:00 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).