From eea3bca1e9d0204a2fce704519e4a4b0e56dbd02 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 16 Jun 2015 20:08:45 +0000 Subject: [PATCH] scst: Remove unreachable code Code after BUG() is unreachable both with CONFIG_BUG=y and with CONFIG_BUG=n. Hence remove such code. Detected by smatch. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6330 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 2 -- scst/src/scst_targ.c | 1 - 2 files changed, 3 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 076d1e61b..43a80154e 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -12655,8 +12655,6 @@ int scst_parse_descriptors(struct scst_cmd *cmd) break; default: sBUG(); - res = -1; - break; } TRACE_EXIT_RES(res); diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 2103ca260..17aa700a0 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -2322,7 +2322,6 @@ static int scst_report_supported_opcodes(struct scst_cmd *cmd) break; default: sBUG(); - goto out_compl; } if (length > buf_len)