From 2d467580d11f2cc8be4ad66581f4edb76ec30d85 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 14 Apr 2015 10:56:47 +0200 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. Signed-off-by: Bart Van Assche --- 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 9c08164aa..dcbed6278 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -9965,8 +9965,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 deb8af02f..bed46ed5d 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -2293,7 +2293,6 @@ static int scst_report_supported_opcodes(struct scst_cmd *cmd) break; default: sBUG(); - goto out_compl; } if (length > buf_len)