Skip to content

Commit

Permalink
staging: dgap: tty.c: removes smatch warning "ignoring unreachable code"
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
lydza authored and gregkh committed Sep 25, 2013
1 parent 57a4219 commit 913b6f8
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions drivers/staging/dgap/dgap_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -3513,10 +3513,6 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
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);
Expand Down Expand Up @@ -3586,12 +3582,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);
}

0 comments on commit 913b6f8

Please sign in to comment.