Skip to contentSkip to conversation

staging: dgnc: remove useless assigned error value in

PATCH Superseded Daeseok Youn 2 participants 3 messages May 4, 2016 – May 10, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 staging: dgnc: remove useless assigned error value in

the result in dgnc_get_mstat() was initialized with -EIO but there are no use of EIO as a result in this function.

---
 drivers/staging/dgnc/dgnc_tty.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/dgnc/dgnc_tty.c +1 -3
index d85d005..46ca01d 100644
@@ -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)
Signature · 1 line
2.8.2
maintainer
#1 lore raw
Quoted 7 lines · Daeseok Youn

the result in dgnc_get_mstat() was initialized with -EIO but there are no use of EIO as a result in this function.

---
 drivers/staging/dgnc/dgnc_tty.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Same Subject: problem here too, it doesn't make sense.

#2 lore raw

2016-05-09 21:09 GMT+09:00 Greg KH <[email protected]>:

Quoted 10 lines · Daeseok Youn
Quoted 7 lines

the result in dgnc_get_mstat() was initialized with -EIO but there are no use of EIO as a result in this function.

---
 drivers/staging/dgnc/dgnc_tty.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Same Subject: problem here too, it doesn't make sense.

OK. I will resend this.

thanks

regards,
Daeseok.