summaryrefslogtreecommitdiff
path: root/drivers/tty/amiserial.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-30 12:22:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-10 20:04:16 +0300
commit2eeaf0bbca79412f15d00a08b930cbd9235fc3a2 (patch)
tree8e4cf5adaee137a054bf3dd4a3bd1c4875c1cc5e /drivers/tty/amiserial.c
parented334c0e3b4def138a27c84d7331c304f87a4701 (diff)
downloadlinux-2eeaf0bbca79412f15d00a08b930cbd9235fc3a2.tar.xz
tty: amiserial.c: move assignment out of if () block
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>
Diffstat (limited to 'drivers/tty/amiserial.c')
-rw-r--r--drivers/tty/amiserial.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 894d3a84e285..e53d9a512c6d 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -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);