diff options
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ec1803a48723..28d9c9d6b4b4 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -213,6 +213,8 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, | |||
213 | int ret = DRIVER_ERROR << 24; | 213 | int ret = DRIVER_ERROR << 24; |
214 | 214 | ||
215 | req = blk_get_request(sdev->request_queue, write, __GFP_WAIT); | 215 | req = blk_get_request(sdev->request_queue, write, __GFP_WAIT); |
216 | if (!req) | ||
217 | return ret; | ||
216 | 218 | ||
217 | if (bufflen && blk_rq_map_kern(sdev->request_queue, req, | 219 | if (bufflen && blk_rq_map_kern(sdev->request_queue, req, |
218 | buffer, bufflen, __GFP_WAIT)) | 220 | buffer, bufflen, __GFP_WAIT)) |