tty: amiserial.c: move assignment out of if () block
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Apr 2015 09:22:05 +0000 (11:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 May 2015 17:04:16 +0000 (19:04 +0200)
We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

CC: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/amiserial.c

index 894d3a84e285ce90ed219ca711da7d48d3eefaab..e53d9a512c6dd16598ca409cf3cbef23a9fff25c 100644 (file)
@@ -1782,7 +1782,8 @@ static int __exit amiga_serial_remove(struct platform_device *pdev)
        struct serial_state *state = platform_get_drvdata(pdev);
 
        /* printk("Unloading %s: version %s\n", serial_name, serial_version); */
-       if ((error = tty_unregister_driver(serial_driver)))
+       error = tty_unregister_driver(serial_driver);
+       if (error)
                printk("SERIAL: failed to unregister serial driver (%d)\n",
                       error);
        put_tty_driver(serial_driver);
This page took 0.026173 seconds and 5 git commands to generate.