On 03/17/13 18:32, Joe Lawrence wrote:
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index c1b05a8..8f009c4 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1635,6 +1635,8 @@ static void scsi_eh_lock_door(struct scsi_device *sdev)
         * request becomes available
         */
        req = blk_get_request(sdev->request_queue, READ, GFP_KERNEL);
+       if (!req)
+               return -ENOMEM;

        req->cmd[0] = ALLOW_MEDIUM_REMOVAL;
        req->cmd[1] = 0;

scsi_eh_lock_door() doesn't return a value to it's caller so I think a plain "return" statement is sufficient here.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to