diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 91b9eca75b75..cad9ef012a14 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1998,8 +1998,10 @@ static int sd_read_protection_type(struct scsi_disk *sdkp, unsigned char *buffer u8 type; int ret = 0; - if (scsi_device_protection(sdp) == 0 || (buffer[12] & 1) == 0) + if (scsi_device_protection(sdp) == 0 || (buffer[12] & 1) == 0) { + sdkp->protection_type = 0; return ret; + } type = ((buffer[12] >> 1) & 7) + 1; /* P_TYPE 0 = Type 1 */