Skip to content

Commit

Permalink
watchdog: Fix rio watchdog probe function
Browse files Browse the repository at this point in the history
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 e42311d (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>
  • Loading branch information
Thomas Gleixner authored and David S. Miller committed Oct 14, 2009
1 parent c58543c commit 03717e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/riowd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 03717e3

Please sign in to comment.