Skip to contentSkip to conversation

watchdog: Fix rio watchdog probe function

PATCH In review Thomas Gleixner 2 participants 2 messages Oct 10, 2009 – Oct 14, 2009 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: Fix rio watchdog probe function

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.

---
 drivers/watchdog/riowd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/riowd.c +1 -1
Index: 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);
#1 lore raw

From: Thomas Gleixner <[email protected]>
Date: Sat, 10 Oct 2009 12:03:28 +0200 (CEST)

Quoted 9 lines

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.

Applied and queued up for -stable, thanks!