Skip to content

Commit

Permalink
[PATCH] hwrng: fix geode probe error unwind
Browse files Browse the repository at this point in the history
The geode hwrng leaks an iomapped resource, if hwrng_register() fails.
This fixes it.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Michael Buesch authored and Linus Torvalds committed Jul 31, 2006
1 parent 5869066 commit 072d3d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/char/hw_random/geode-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ static int __init mod_init(void)
if (err) {
printk(KERN_ERR PFX "RNG registering failed (%d)\n",
err);
goto out;
goto err_unmap;
}
out:
return err;

err_unmap:
iounmap(mem);
goto out;
}

static void __exit mod_exit(void)
Expand Down

0 comments on commit 072d3d1

Please sign in to comment.