aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/scsi_lib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 601b9f1de267..07dfc17d4824 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1706,8 +1706,12 @@ out_put_budget:
1706 ret = BLK_STS_DEV_RESOURCE; 1706 ret = BLK_STS_DEV_RESOURCE;
1707 break; 1707 break;
1708 default: 1708 default:
1709 if (unlikely(!scsi_device_online(sdev)))
1710 scsi_req(req)->result = DID_NO_CONNECT << 16;
1711 else
1712 scsi_req(req)->result = DID_ERROR << 16;
1709 /* 1713 /*
1710 * Make sure to release all allocated ressources when 1714 * Make sure to release all allocated resources when
1711 * we hit an error, as we will never see this command 1715 * we hit an error, as we will never see this command
1712 * again. 1716 * again.
1713 */ 1717 */