[PATCH v2 2/5] staging: dgap: tty.c: removes smatch warning "ignoring unreachable code"
Lidza Louina
lidza.louina at gmail.com
Wed Sep 25 23:08:51 UTC 2013
This patch removes this smatch warning:
info: ignoring unreachable code.
There were instances where there was extra code after
the default action in switch statements. These default
actions ended with a break so the code wasn't being run
at anytime. This patch removes that extra code.
Signed-off-by: Lidza Louina <lidza.louina at gmail.com>
---
drivers/staging/dgap/dgap_tty.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c
index 2b26152..0b3c039 100644
--- a/drivers/staging/dgap/dgap_tty.c
+++ b/drivers/staging/dgap/dgap_tty.c
@@ -3512,11 +3512,6 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
DGAP_UNLOCK(bd->bd_lock, lock_flags);
return(-EINVAL);
}
-
- DGAP_UNLOCK(ch->ch_lock, lock_flags2);
- DGAP_UNLOCK(bd->bd_lock, lock_flags);
- return(-ENOIOCTLCMD);
-
case DIGI_GETA:
/* get information for ditty */
DGAP_UNLOCK(ch->ch_lock, lock_flags2);
@@ -3586,12 +3581,4 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
return(-ENOIOCTLCMD);
}
-
- DGAP_UNLOCK(ch->ch_lock, lock_flags2);
- DGAP_UNLOCK(bd->bd_lock, lock_flags);
-
- DPR_IOCTL(("dgap_tty_ioctl end - cmd %s (%x), arg %lx\n",
- dgap_ioctl_name(cmd), cmd, arg));
-
- return(0);
}
--
1.8.1.2
More information about the devel
mailing list