Commit 832c2852 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] isicom error path fix

From: Geert Uytterhoeven <geert@linux-m68k.org>

Variable error is not initialized, but printed if tty_unregister_driver()
fails.
parent 3894c1f1
...@@ -1649,8 +1649,8 @@ static int register_drivers(void) ...@@ -1649,8 +1649,8 @@ static int register_drivers(void)
static void unregister_drivers(void) static void unregister_drivers(void)
{ {
int error; int error = tty_unregister_driver(isicom_normal);
if (tty_unregister_driver(isicom_normal)) if (error)
printk(KERN_DEBUG "ISICOM: couldn't unregister normal driver error=%d.\n",error); printk(KERN_DEBUG "ISICOM: couldn't unregister normal driver error=%d.\n",error);
put_tty_driver(isicom_normal); put_tty_driver(isicom_normal);
} }
......
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