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.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
c58543c869
commit
03717e3d12
@@ -206,7 +206,7 @@ static int __devinit riowd_probe(struct of_device *op,
|
|||||||
|
|
||||||
dev_set_drvdata(&op->dev, p);
|
dev_set_drvdata(&op->dev, p);
|
||||||
riowd_device = p;
|
riowd_device = p;
|
||||||
err = 0;
|
return 0;
|
||||||
|
|
||||||
out_iounmap:
|
out_iounmap:
|
||||||
of_iounmap(&op->resource[0], p->regs, 2);
|
of_iounmap(&op->resource[0], p->regs, 2);
|
||||||
|
Reference in New Issue
Block a user