diff options
-rw-r--r-- | drivers/block/swim3.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index 87ca8f207c7c..1e2ae90d7715 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c | |||
@@ -1091,8 +1091,6 @@ static int swim3_add_device(struct macio_dev *mdev, int index) | |||
1091 | struct floppy_state *fs = &floppy_states[index]; | 1091 | struct floppy_state *fs = &floppy_states[index]; |
1092 | int rc = -EBUSY; | 1092 | int rc = -EBUSY; |
1093 | 1093 | ||
1094 | /* Do this first for message macros */ | ||
1095 | memset(fs, 0, sizeof(*fs)); | ||
1096 | fs->mdev = mdev; | 1094 | fs->mdev = mdev; |
1097 | fs->index = index; | 1095 | fs->index = index; |
1098 | 1096 | ||
@@ -1191,14 +1189,15 @@ static int swim3_attach(struct macio_dev *mdev, | |||
1191 | return rc; | 1189 | return rc; |
1192 | } | 1190 | } |
1193 | 1191 | ||
1194 | fs = &floppy_states[floppy_count]; | ||
1195 | |||
1196 | disk = alloc_disk(1); | 1192 | disk = alloc_disk(1); |
1197 | if (disk == NULL) { | 1193 | if (disk == NULL) { |
1198 | rc = -ENOMEM; | 1194 | rc = -ENOMEM; |
1199 | goto out_unregister; | 1195 | goto out_unregister; |
1200 | } | 1196 | } |
1201 | 1197 | ||
1198 | fs = &floppy_states[floppy_count]; | ||
1199 | memset(fs, 0, sizeof(*fs)); | ||
1200 | |||
1202 | disk->queue = blk_mq_init_sq_queue(&fs->tag_set, &swim3_mq_ops, 2, | 1201 | disk->queue = blk_mq_init_sq_queue(&fs->tag_set, &swim3_mq_ops, 2, |
1203 | BLK_MQ_F_SHOULD_MERGE); | 1202 | BLK_MQ_F_SHOULD_MERGE); |
1204 | if (IS_ERR(disk->queue)) { | 1203 | if (IS_ERR(disk->queue)) { |