Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / osst.c
index 58f5be4740e9af378c7eb44d2786ab8e28367f39..de0b1a704fb508d95fb6f7874bbe1433dcb92f4c 100644 (file)
@@ -4698,12 +4698,14 @@ static int __os_scsi_tape_open(struct inode * inode, struct file * filp)
                        break;
 
                        if ((SRpnt->sense[2] & 0x0f) == UNIT_ATTENTION) {
+                               int j;
+
                                STp->pos_unknown = 0;
                                STp->partition = STp->new_partition = 0;
                                if (STp->can_partitions)
                                        STp->nbr_partitions = 1;  /* This guess will be updated later if necessary */
-                               for (i=0; i < ST_NBR_PARTITIONS; i++) {
-                                       STps = &(STp->ps[i]);
+                               for (j = 0; j < ST_NBR_PARTITIONS; j++) {
+                                       STps = &(STp->ps[j]);
                                        STps->rw = ST_IDLE;
                                        STps->eof = ST_NOEOF;
                                        STps->at_sm = 0;