From 0c4813bf300fcb24d622bbd2e3d6b84da0866611 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 11 Jun 2015 16:43:44 +0000 Subject: [PATCH] Merge r5901 from the iser branch git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x@6278 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/isert_login.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index f21730b41..74615a925 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -602,7 +602,9 @@ static ssize_t isert_read(struct file *filp, char __user *buf, size_t count, break; default: - sBUG(); + PRINT_ERROR("Invalid state in %s (%d)\n", __func__, + dev->state); + to_read = 0; } return to_read; @@ -644,7 +646,9 @@ static ssize_t isert_write(struct file *filp, const char __user *buf, break; default: - sBUG(); + PRINT_ERROR("Invalid state in %s (%d)\n", __func__, + dev->state); + to_write = 0; } return to_write;