aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-mpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r--drivers/md/dm-mpath.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 9f7302d4878d..fea966d66f98 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -525,8 +525,10 @@ static int parse_path_selector(struct arg_set *as, struct priority_group *pg,
525 } 525 }
526 526
527 r = read_param(_params, shift(as), &ps_argc, &ti->error); 527 r = read_param(_params, shift(as), &ps_argc, &ti->error);
528 if (r) 528 if (r) {
529 dm_put_path_selector(pst);
529 return -EINVAL; 530 return -EINVAL;
531 }
530 532
531 r = pst->create(&pg->ps, ps_argc, as->argv); 533 r = pst->create(&pg->ps, ps_argc, as->argv);
532 if (r) { 534 if (r) {
@@ -623,8 +625,10 @@ static struct priority_group *parse_priority_group(struct arg_set *as,
623 struct pgpath *pgpath; 625 struct pgpath *pgpath;
624 struct arg_set path_args; 626 struct arg_set path_args;
625 627
626 if (as->argc < nr_params) 628 if (as->argc < nr_params) {
629 ti->error = "not enough path parameters";
627 goto bad; 630 goto bad;
631 }
628 632
629 path_args.argc = nr_params; 633 path_args.argc = nr_params;
630 path_args.argv = as->argv; 634 path_args.argv = as->argv;
@@ -867,7 +871,7 @@ static int reinstate_path(struct pgpath *pgpath)
867 if (pgpath->path.is_active) 871 if (pgpath->path.is_active)
868 goto out; 872 goto out;
869 873
870 if (!pgpath->pg->ps.type) { 874 if (!pgpath->pg->ps.type->reinstate_path) {
871 DMWARN("Reinstate path not supported by path selector %s", 875 DMWARN("Reinstate path not supported by path selector %s",
872 pgpath->pg->ps.type->name); 876 pgpath->pg->ps.type->name);
873 r = -EINVAL; 877 r = -EINVAL;