diff options
Diffstat (limited to 'drivers/block/swim.c')
-rw-r--r-- | drivers/block/swim.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/swim.c b/drivers/block/swim.c index eed453528f4c..821594cd1315 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -843,7 +843,9 @@ static int swim_floppy_init(struct swim_priv *swd) swd->unit[drive].disk->events = DISK_EVENT_MEDIA_CHANGE; swd->unit[drive].disk->private_data = &swd->unit[drive]; set_capacity(swd->unit[drive].disk, 2880); - add_disk(swd->unit[drive].disk); + err = add_disk(swd->unit[drive].disk); + if (err) + goto exit_put_disks; swd->unit[drive].registered = true; } |