diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index be0f5e060..b00c61d1a 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -924,8 +924,9 @@ out_unlock: if (!ha_locked) spin_unlock_irqrestore(&ha->hardware_lock, flags); - if (do_tgt_cmd_done && !in_interrupt()) { - msleep(250); + if (do_tgt_cmd_done) { + if (!in_interrupt()) + msleep(250); scst_tgt_cmd_done(cmd->scst_cmd); /* !! At this point cmd could be already freed !! */ }