aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r--include/scsi/scsi_device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index f171c65dc5a8..2d3ec5094685 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -462,7 +462,7 @@ static inline int scsi_device_qas(struct scsi_device *sdev)
462} 462}
463static inline int scsi_device_enclosure(struct scsi_device *sdev) 463static inline int scsi_device_enclosure(struct scsi_device *sdev)
464{ 464{
465 return sdev->inquiry[6] & (1<<6); 465 return sdev->inquiry ? (sdev->inquiry[6] & (1<<6)) : 1;
466} 466}
467 467
468static inline int scsi_device_protection(struct scsi_device *sdev) 468static inline int scsi_device_protection(struct scsi_device *sdev)