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: