mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] watchdog: Fix rio watchdog probe function
@ 2009-10-10 10:03 Thomas Gleixner
  2009-10-14  8:18 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Gleixner @ 2009-10-10 10:03 UTC (permalink / raw)
  To: David Miller; +Cc: LKML

After sucessfully registering the misc device the driver iounmaps the
hardware registers and kfree's the device data structure. Ouch !

This was introduced with commit e42311d75 (riowatchdog: Convert to
pure OF driver) and went unnoticed for more than a year :)

Return success instead of dropping into the error cleanup code path.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
---
 drivers/watchdog/riowd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-tip/drivers/watchdog/riowd.c
===================================================================
--- linux-2.6-tip.orig/drivers/watchdog/riowd.c
+++ linux-2.6-tip/drivers/watchdog/riowd.c
@@ -206,7 +206,7 @@ static int __devinit riowd_probe(struct 
 
 	dev_set_drvdata(&op->dev, p);
 	riowd_device = p;
-	err = 0;
+	return 0;
 
 out_iounmap:
 	of_iounmap(&op->resource[0], p->regs, 2);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: Fix rio watchdog probe function
  2009-10-10 10:03 [PATCH] watchdog: Fix rio watchdog probe function Thomas Gleixner
@ 2009-10-14  8:18 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-10-14  8:18 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel

From: Thomas Gleixner <tglx@linutronix.de>
Date: Sat, 10 Oct 2009 12:03:28 +0200 (CEST)

> After sucessfully registering the misc device the driver iounmaps the
> hardware registers and kfree's the device data structure. Ouch !
> 
> This was introduced with commit e42311d75 (riowatchdog: Convert to
> pure OF driver) and went unnoticed for more than a year :)
> 
> Return success instead of dropping into the error cleanup code path.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Applied and queued up for -stable, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-14  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-10 10:03 [PATCH] watchdog: Fix rio watchdog probe function Thomas Gleixner
2009-10-14  8:18 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome