From: Dan Carpenter Date: Wed, 27 Oct 2010 22:34:18 +0000 (-0700) Subject: drivers/char/rocket.c: release_region or error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=713efa9a64fac01abc296228c5ca4f507217a8c9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drivers/char/rocket.c: release_region or error path There was a release_region() missing on the error path. Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 7c79d243acc9..86308830ac42 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c @@ -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: