summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorHeena Sirwani <heenasirwani@gmail.com>2014-10-06 10:19:09 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-20 10:29:18 +0800
commitca5dd0b83da6132a85b3c384eb0504a2c9cfd008 (patch)
tree67ccc8eedba58474c51bae9cf58e5e991ac51b9c /drivers/staging
parent2ff6179f162b205fc98bb2083b653f46c52d6642 (diff)
Staging: dgnc: Compress two lines of code into one.
The following patch merges two lines of code into one using coccinelle and removes unused variables. The semantic patch used is as follows: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Heena Sirwani <heenasirwani@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/dgnc/dgnc_cls.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
index a17f4f6095c8..f0b1ec7847e7 100644
--- a/drivers/staging/dgnc/dgnc_cls.c
+++ b/drivers/staging/dgnc/dgnc_cls.c
@@ -964,7 +964,6 @@ static int cls_drain(struct tty_struct *tty, uint seconds)
unsigned long flags;
struct channel_t *ch;
struct un_t *un;
- int rc = 0;
if (!tty || tty->magic != TTY_MAGIC)
return -ENXIO;
@@ -984,12 +983,11 @@ static int cls_drain(struct tty_struct *tty, uint seconds)
/*
* NOTE: Do something with time passed in.
*/
- rc = wait_event_interruptible(un->un_flags_wait,
- ((un->un_flags & UN_EMPTY) == 0));
/* If ret is non-zero, user ctrl-c'ed us */
- return rc;
+ return wait_event_interruptible(un->un_flags_wait,
+ ((un->un_flags & UN_EMPTY) == 0));
}