From f59c054301ff2ebebc25ef9e2841c33d2be0fcf4 Mon Sep 17 00:00:00 2001 From: Aastha Gupta Date: Sat, 16 Sep 2017 19:29:33 +0530 Subject: [PATCH] staging: dgnc: remove variable rc Found using coccinelle script: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dgnc/dgnc_neo.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 1943e66fec57..0ae229c3aaaa 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -1182,7 +1182,6 @@ static int neo_drain(struct tty_struct *tty, uint seconds) unsigned long flags; struct channel_t *ch; struct un_t *un; - int rc = 0; if (!tty) return -ENXIO; @@ -1199,12 +1198,10 @@ static int neo_drain(struct tty_struct *tty, uint seconds) un->un_flags |= UN_EMPTY; spin_unlock_irqrestore(&ch->ch_lock, flags); - rc = wait_event_interruptible_timeout(un->un_flags_wait, - ((un->un_flags & UN_EMPTY) == 0), - msecs_to_jiffies(seconds * 1000)); - - /* If ret is non-zero, user ctrl-c'ed us */ - return rc; + /* If returned value is non-zero, user ctrl-c'ed us */ + return wait_event_interruptible_timeout(un->un_flags_wait, + ((un->un_flags & UN_EMPTY) == 0), + msecs_to_jiffies(seconds * 1000)); } /* -- 2.45.2