@@ -1051,6 +1051,8 @@ int ubi_detach_mtd_dev(int ubi_num, int anyway)
ubi_notify_all(ubi, UBI_VOLUME_REMOVED, NULL);
dbg_msg("detaching mtd%d from ubi%d", ubi->mtd->index, ubi_num);
* Before freeing anything, we have to stop the background thread to
* prevent it from doing anything on this device while we are freeing.
@@ -1058,10 +1060,6 @@ int ubi_detach_mtd_dev(int ubi_num, int anyway)
- /* If no fastmap is present on the FLASH write one. */
- if (!ubi->fm)
* Get a reference to the device in order to prevent 'dev_release()'
* from freeing the @ubi object.