diff options
Diffstat (limited to 'drivers/ide/ide-floppy_ioctl.c')
-rw-r--r-- | drivers/ide/ide-floppy_ioctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c index 8f8be8546038..cd8a42027ede 100644 --- a/drivers/ide/ide-floppy_ioctl.c +++ b/drivers/ide/ide-floppy_ioctl.c | |||
@@ -36,9 +36,9 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive, | |||
36 | int __user *arg) | 36 | int __user *arg) |
37 | { | 37 | { |
38 | struct ide_disk_obj *floppy = drive->driver_data; | 38 | struct ide_disk_obj *floppy = drive->driver_data; |
39 | u8 header_len, desc_cnt; | ||
40 | int i, blocks, length, u_array_size, u_index; | 39 | int i, blocks, length, u_array_size, u_index; |
41 | int __user *argp; | 40 | int __user *argp; |
41 | u8 pc_buf[256], header_len, desc_cnt; | ||
42 | 42 | ||
43 | if (get_user(u_array_size, arg)) | 43 | if (get_user(u_array_size, arg)) |
44 | return -EFAULT; | 44 | return -EFAULT; |
@@ -47,6 +47,9 @@ static int ide_floppy_get_format_capacities(ide_drive_t *drive, | |||
47 | return -EINVAL; | 47 | return -EINVAL; |
48 | 48 | ||
49 | ide_floppy_create_read_capacity_cmd(pc); | 49 | ide_floppy_create_read_capacity_cmd(pc); |
50 | pc->buf = &pc_buf[0]; | ||
51 | pc->buf_size = sizeof(pc_buf); | ||
52 | |||
50 | if (ide_queue_pc_tail(drive, floppy->disk, pc)) { | 53 | if (ide_queue_pc_tail(drive, floppy->disk, pc)) { |
51 | printk(KERN_ERR "ide-floppy: Can't get floppy parameters\n"); | 54 | printk(KERN_ERR "ide-floppy: Can't get floppy parameters\n"); |
52 | return -EIO; | 55 | return -EIO; |