[PATCH 3/5] hpsa: Return SCSI_MLQUEUE_HOST_BUSY on command allocation failure.

Stephen M. Cameron
2009-12-08T21:36:25Z

hpsa: Return SCSI_MLQUEUE_HOST_BUSY on command allocation failure.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
drivers/scsi/hpsa.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 8b8ddfc..0e696ee 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1842,9 +1842,7 @@ static int hpsa_scsi_queue_command(struct scsi_cmnd *cmd,
spin_unlock_irqrestore(&h->lock, flags);
if (c == NULL) { /* trouble... */
dev_err(&h->pdev->dev, "cmd_alloc returned NULL!\n");
- cmd->result = DID_NO_CONNECT << 16;
- done(cmd);
- return 0;
+ return SCSI_MLQUEUE_HOST_BUSY;
}

/* Fill in the command list header */