diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 8a50da4f148f..26ae749184da 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -2964,6 +2964,7 @@ static int raid1_run(struct mddev *mddev) * RAID1 needs at least one disk in active */ if (conf->raid_disks - mddev->degraded < 1) { + md_unregister_thread(&conf->thread); ret = -EINVAL; goto abort; }