diff options
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 12d58a7ed6bc..ad59abb47722 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -2280,7 +2280,8 @@ static int st_set_options(struct scsi_tape *STp, long options) | |||
2280 | } else if (code == MT_ST_SET_CLN) { | 2280 | } else if (code == MT_ST_SET_CLN) { |
2281 | value = (options & ~MT_ST_OPTIONS) & 0xff; | 2281 | value = (options & ~MT_ST_OPTIONS) & 0xff; |
2282 | if (value != 0 && | 2282 | if (value != 0 && |
2283 | value < EXTENDED_SENSE_START && value >= SCSI_SENSE_BUFFERSIZE) | 2283 | (value < EXTENDED_SENSE_START || |
2284 | value >= SCSI_SENSE_BUFFERSIZE)) | ||
2284 | return (-EINVAL); | 2285 | return (-EINVAL); |
2285 | STp->cln_mode = value; | 2286 | STp->cln_mode = value; |
2286 | STp->cln_sense_mask = (options >> 8) & 0xff; | 2287 | STp->cln_sense_mask = (options >> 8) & 0xff; |