aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-03-30 23:39:39 -0400
committerNeilBrown <neilb@suse.de>2009-03-30 23:39:39 -0400
commite0cf8f045b2023b0b3f919ee93eb94345f648434 (patch)
tree21d8d0741a5ae4676fea5b53939cc806ae2b41bd /drivers/md/raid5.c
parent91adb56473febeeb3ef657bb5147ddd355465700 (diff)
md: md_unregister_thread should cope with being passed NULL
Mostly md_unregister_thread is only called when we know that the thread is NULL, but sometimes we need to check first. It is safer to put the check inside md_unregister_thread itself. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index d019a85547b4..81789fa7a023 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4463,8 +4463,7 @@ static int run(mddev_t *mddev)
4463 4463
4464 return 0; 4464 return 0;
4465abort: 4465abort:
4466 if (mddev->thread) 4466 md_unregister_thread(mddev->thread);
4467 md_unregister_thread(mddev->thread);
4468 mddev->thread = NULL; 4467 mddev->thread = NULL;
4469 if (conf) { 4468 if (conf) {
4470 shrink_stripes(conf); 4469 shrink_stripes(conf);