Commit 713efa9a authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds

drivers/char/rocket.c: release_region or error path

There was a release_region() missing on the error path.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 60ee6d5f
......@@ -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
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment