if region_action failed, return the rc valude instead of 0
Signed-off-by: Yi Zhang <yi.zhang(a)redhat.com>
---
ndctl/region.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ndctl/region.c b/ndctl/region.c
index 993b3f8..7945007 100644
--- a/ndctl/region.c
+++ b/ndctl/region.c
@@ -89,7 +89,7 @@ static int region_action(struct ndctl_region *region, enum device_action
mode)
break;
}
- return 0;
+ return rc;
}
static int do_xable_region(const char *region_arg, enum device_action mode,
--
2.17.2