File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -2018,12 +2018,18 @@ static void ataflop_probe(dev_t dev)
2018
2018
2019
2019
if (drive >= FD_MAX_UNITS || type >= NUM_DISK_MINORS )
2020
2020
return ;
2021
- if (!unit [drive ].disk [type ]) {
2022
- if (ataflop_alloc_disk (drive , type ) == 0 ) {
2023
- add_disk (unit [drive ].disk [type ]);
2024
- unit [drive ].registered [type ] = true;
2025
- }
2026
- }
2021
+ if (unit [drive ].disk [type ])
2022
+ return
2023
+ if (ataflop_alloc_disk (drive , type ))
2024
+ return ;
2025
+ if (add_disk (unit [drive ].disk [type ]))
2026
+ goto cleanup_disk ;
2027
+ unit [drive ].registered [type ] = true;
2028
+ return ;
2029
+
2030
+ cleanup_disk :
2031
+ blk_cleanup_disk (unit [drive ].disk [type ]);
2032
+ unit [drive ].disk [type ] = NULL ;
2027
2033
}
2028
2034
2029
2035
static void atari_floppy_cleanup (void )
You can’t perform that action at this time.
0 commit comments