ide-floppy/ide_floppy_get_sfrp_bit: use local buffer
authorBorislav Petkov <petkovbb@gmail.com>
Sat, 2 May 2009 08:45:17 +0000 (10:45 +0200)
committerBorislav Petkov <petkovbb@gmail.com>
Fri, 15 May 2009 04:44:17 +0000 (06:44 +0200)
There should be no functional change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
drivers/ide/ide-floppy_ioctl.c

index 9c2518d7514d739b3fc515e3f1e8b11c7d2cd98c..0d2c9f0368dacba57ea3e691aaf1950d29f199b3 100644 (file)
@@ -117,16 +117,17 @@ static void ide_floppy_create_format_unit_cmd(struct ide_atapi_pc *pc, int b,
 static int ide_floppy_get_sfrp_bit(ide_drive_t *drive, struct ide_atapi_pc *pc)
 {
        struct ide_disk_obj *floppy = drive->driver_data;
+       u8 buf[20];
 
        drive->atapi_flags &= ~IDE_AFLAG_SRFP;
 
        ide_floppy_create_mode_sense_cmd(pc, IDEFLOPPY_CAPABILITIES_PAGE);
        pc->flags |= PC_FLAG_SUPPRESS_ERROR;
 
-       if (ide_queue_pc_tail(drive, floppy->disk, pc, pc->buf, pc->req_xfer))
+       if (ide_queue_pc_tail(drive, floppy->disk, pc, buf, pc->req_xfer))
                return 1;
 
-       if (pc->buf[8 + 2] & 0x40)
+       if (buf[8 + 2] & 0x40)
                drive->atapi_flags |= IDE_AFLAG_SRFP;
 
        return 0;