diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-05-16 13:24:27 -0400 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-05-16 13:24:27 -0400 |
commit | 0a1f094ea7bfb405b96f53e5a6c55759e29e0987 (patch) | |
tree | 0d1beed2b746cddce8ae295a4117003437b30533 /drivers/scsi/scsi_lib.c | |
parent | 0f106b4f7fe6ad697cff5c02f0edd80bb066fabe (diff) | |
parent | 678562e527fd9979f1765ffa1eb34738fc174425 (diff) |
Merge commit 'v2.6.38.6' into linaro-2.6.38
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index fb2bb35c62c..415fdf2bd94 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -400,10 +400,15 @@ static inline int scsi_host_is_busy(struct Scsi_Host *shost) static void scsi_run_queue(struct request_queue *q) { struct scsi_device *sdev = q->queuedata; - struct Scsi_Host *shost = sdev->host; + struct Scsi_Host *shost; LIST_HEAD(starved_list); unsigned long flags; + /* if the device is dead, sdev will be NULL, so no queue to run */ + if (!sdev) + return; + + shost = sdev->host; if (scsi_target(sdev)->single_lun) scsi_single_lun_run(sdev); |