We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c85af72 + 895a9b3 commit bb4f7cbCopy full SHA for bb4f7cb
1 file changed
drivers/block/floppy.c
@@ -4722,19 +4722,15 @@ static int __init do_floppy_init(void)
4722
floppy_device[drive].dev.groups = floppy_dev_groups;
4723
4724
err = platform_device_register(&floppy_device[drive]);
4725
- if (err) {
4726
- platform_device_put(&floppy_device[drive]);
+ if (err)
4727
goto out_remove_drives;
4728
- }
+
4729
registered[drive] = true;
4730
4731
err = device_add_disk(&floppy_device[drive].dev,
4732
disks[drive][0], NULL);
4733
4734
- platform_device_unregister(&floppy_device[drive]);
4735
- registered[drive] = false;
4736
4737
4738
}
4739
4740
return 0;
0 commit comments