Skip to content

Commit

Permalink
drivers/char/rocket.c: release_region or error path
Browse files Browse the repository at this point in the history
There was a release_region() missing on the error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Dan Carpenter authored and Linus Torvalds committed Oct 28, 2010
1 parent 60ee6d5 commit 713efa9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/char/rocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -2345,7 +2345,7 @@ static int __init rp_init(void)
ret = tty_register_driver(rocket_driver);
if (ret < 0) {
printk(KERN_ERR "Couldn't install tty RocketPort driver\n");
goto err_tty;
goto err_controller;
}

#ifdef ROCKET_DEBUG_OPEN
Expand Down Expand Up @@ -2380,6 +2380,9 @@ static int __init rp_init(void)
return 0;
err_ttyu:
tty_unregister_driver(rocket_driver);
err_controller:
if (controller)
release_region(controller, 4);
err_tty:
put_tty_driver(rocket_driver);
err:
Expand Down

0 comments on commit 713efa9

Please sign in to comment.