]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
watchdog: Fix rio watchdog probe function
authorThomas Gleixner <tglx@linutronix.de>
Wed, 14 Oct 2009 08:18:26 +0000 (01:18 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:21:59 +0000 (16:21 -0800)
[ Upstream commit 03717e3d12b625268848414e39beda25e4515692 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/watchdog/riowd.c

index 1e8f02f440e6f5ee6db426f0e0d9863731b686b0..d3c824dc23588b668096cd368efec6755cbbb9af 100644 (file)
@@ -206,7 +206,7 @@ static int __devinit riowd_probe(struct of_device *op,
 
        dev_set_drvdata(&op->dev, p);
        riowd_device = p;
-       err = 0;
+       return 0;
 
 out_iounmap:
        of_iounmap(&op->resource[0], p->regs, 2);