diff options
author | Daeseok Youn <daeseok.youn@gmail.com> | 2016-07-06 15:11:52 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-15 19:06:09 +0200 |
commit | 290e3abaccbac6afeb3376b13627b3fc6974554b (patch) | |
tree | a65a243968cc95a6906348ca4c82984e1bfd697c /drivers/staging/dgnc/dgnc_tty.c | |
parent | 10334418d62d968e2901eb116ea449828b782c96 (diff) | |
download | linux-290e3abaccbac6afeb3376b13627b3fc6974554b.tar.bz2 |
staging: dgnc: remove useless error value assignment
The "result" variable in dgnc_get_mstat() was initialized with
"-EIO". But if the "ch" is not null, "result" will be set to zero
and if the "ch" is null, dgnc_get_mstat() will return "-ENXIO" as
an error. So "-EIO" error value was useless in dgnc_get_mstat().
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc/dgnc_tty.c')
-rw-r--r-- | drivers/staging/dgnc/dgnc_tty.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index 6758859ce564..17ba96684c6b 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -1979,7 +1979,7 @@ static void dgnc_tty_send_xchar(struct tty_struct *tty, char c) static inline int dgnc_get_mstat(struct channel_t *ch) { unsigned char mstat; - int result = -EIO; + int result = 0; unsigned long flags; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) @@ -1991,8 +1991,6 @@ static inline int dgnc_get_mstat(struct channel_t *ch) spin_unlock_irqrestore(&ch->ch_lock, flags); - result = 0; - if (mstat & UART_MCR_DTR) result |= TIOCM_DTR; if (mstat & UART_MCR_RTS) |