Commit ca5dd0b8 authored by Heena Sirwani's avatar Heena Sirwani Committed by Greg Kroah-Hartman

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: default avatarHeena Sirwani <heenasirwani@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2ff6179f
...@@ -964,7 +964,6 @@ static int cls_drain(struct tty_struct *tty, uint seconds) ...@@ -964,7 +964,6 @@ static int cls_drain(struct tty_struct *tty, uint seconds)
unsigned long flags; unsigned long flags;
struct channel_t *ch; struct channel_t *ch;
struct un_t *un; struct un_t *un;
int rc = 0;
if (!tty || tty->magic != TTY_MAGIC) if (!tty || tty->magic != TTY_MAGIC)
return -ENXIO; return -ENXIO;
...@@ -984,12 +983,11 @@ static int cls_drain(struct tty_struct *tty, uint seconds) ...@@ -984,12 +983,11 @@ static int cls_drain(struct tty_struct *tty, uint seconds)
/* /*
* NOTE: Do something with time passed in. * 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 */ /* 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));
} }
......
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