Merge 3.4-rc5 into staging-next
[firefly-linux-kernel-4.4.55.git] / drivers / staging / rts_pstor / ms.c
index e098a90e464277575f2ed3539213fee48fd5ca33..0bf6d95b3fabcf95fc157cff061a07bb59c81e70 100644 (file)
@@ -3498,7 +3498,8 @@ static int ms_rw_multi_sector(struct scsi_cmnd *srb, struct rtsx_chip *chip, u32
 
                log_blk++;
 
-               for (seg_no = 0; seg_no < sizeof(ms_start_idx)/2; seg_no++) {
+               for (seg_no = 0; seg_no < ARRAY_SIZE(ms_start_idx) - 1;
+                               seg_no++) {
                        if (log_blk < ms_start_idx[seg_no+1])
                                break;
                }