From 5d73f89bb07b5f558f83c2269ef4407fddc69844 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 6 Nov 2015 18:03:36 +0000 Subject: [PATCH] isert-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@6600 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/isert_login.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index f92eafe30..1e15f89c8 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -804,11 +804,8 @@ int isert_login_req_rx(struct iscsi_cmnd *login_req) switch (dev->state) { case CS_INIT: case CS_RSP_FINISHED: - if (unlikely(dev->login_req != NULL)) { + if (unlikely(dev->login_req != NULL)) sBUG(); - res = -EINVAL; - goto out; - } break; case CS_REQ_BHS: /* Got login request before done handling old one */ @@ -825,8 +822,6 @@ int isert_login_req_rx(struct iscsi_cmnd *login_req) default: sBUG(); - res = -EINVAL; - goto out; }