aboutsummaryrefslogtreecommitdiffstats
path: root/0004-hvcs.c-move-assignment-out-of-if-block.patch
diff options
Diffstat (limited to '0004-hvcs.c-move-assignment-out-of-if-block.patch')
-rw-r--r--0004-hvcs.c-move-assignment-out-of-if-block.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/0004-hvcs.c-move-assignment-out-of-if-block.patch b/0004-hvcs.c-move-assignment-out-of-if-block.patch
new file mode 100644
index 00000000000000..f00458631b80a0
--- /dev/null
+++ b/0004-hvcs.c-move-assignment-out-of-if-block.patch
@@ -0,0 +1,35 @@
+From c7e61966f54c02d32a22e523c55d13a7b5304c3b Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Wed, 29 Apr 2015 16:22:04 +0200
+Subject: [PATCH 04/36] hvcs.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>
+CC: Masanari Iida <standby24x7@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/hvc/hvcs.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
+index 81ff7e1bfb1a..f7ff97c0ad34 100644
+--- a/drivers/tty/hvc/hvcs.c
++++ b/drivers/tty/hvc/hvcs.c
+@@ -1044,8 +1044,8 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address,
+ * It is possible that the vty-server was removed between the time that
+ * the conn was registered and now.
+ */
+- if (!(rc = request_irq(irq, &hvcs_handle_interrupt,
+- 0, "ibmhvcs", hvcsd))) {
++ rc = request_irq(irq, &hvcs_handle_interrupt, 0, "ibmhvcs", hvcsd);
++ if (!rc) {
+ /*
+ * It is possible the vty-server was removed after the irq was
+ * requested but before we have time to enable interrupts.
+--
+2.3.7
+