summaryrefslogtreecommitdiff
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 57ecb51ec5fd..3387f940140b 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7279,6 +7279,8 @@ int md_setup_cluster(struct mddev *mddev, int nodes)
void md_cluster_stop(struct mddev *mddev)
{
+ if (!md_cluster_ops)
+ return;
md_cluster_ops->leave(mddev);
module_put(md_cluster_mod);
}