From 3ad3d2e3e77b8b10996d47300b985186faf71e67 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 4 Jun 2010 12:00:48 +0000 Subject: [PATCH] Fixes incorrect processing in scst_tape_generic_dev_done() in case of errors git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1739 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 182b8cf6e..fd8329316 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5516,6 +5516,9 @@ int scst_tape_generic_dev_done(struct scst_cmd *cmd, * therefore change them only if necessary */ + if (cmd->status != SAM_STAT_GOOD) + goto out; + switch (opcode) { case MODE_SENSE: case MODE_SELECT: