lkml.org 
[lkml]   [2009]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 17/28] watchdog: Fix probe function of riowd
After sucessfully registering the misc device the driver iounmaps the
device 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);



\
 
 \ /
  Last update: 2009-10-10 18:15    [W:0.193 / U:4.984 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site