Skip to contentSkip to conversation

staging: dgnc: remove useless switch-case statements

PATCH New Daeseok Youn 1 participant 1 message Mar 14, 2017

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

PATCH v2 2/2 staging: dgnc: remove useless switch-case statements

The dgnc_tty_send_break() has a switch-case condition for msec. It is no use except case -1.

---
V2: The two patches in previous series are merged into one patch.

 drivers/staging/dgnc/dgnc_tty.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/staging/dgnc/dgnc_tty.c +1 -9
index dc76e9f..854bd1d 100644
@@ -1790,16 +1790,8 @@ static int dgnc_tty_send_break(struct tty_struct *tty, int msec)
 	if (!bd || bd->magic != DGNC_BOARD_MAGIC)
 		return -EIO;
 
-	switch (msec) {
-	case -1:
+	if (msec < 0)
 		msec = 0xFFFF;
-		break;
-	case 0:
-		msec = 0;
-		break;
-	default:
-		break;
-	}
 
 	spin_lock_irqsave(&ch->ch_lock, flags);
 
Signature · 1 line
1.9.1