btrfs-progs: resize: return error value from check_resize_args()

check_resize_args() function checks user argument amount but does not
return the correct value in case it's not valid.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Sidong Yang 2022-10-16 09:29:27 +00:00 committed by David Sterba
parent f0c2bb0057
commit 55438f3930

View File

@ -1122,6 +1122,7 @@ static int check_resize_args(const char *amount, const char *path) {
ret = 1;
goto out;
}
ret = 0;
sizestr = amount_dup;
devstr = strchr(sizestr, ':');
@ -1208,7 +1209,7 @@ static int check_resize_args(const char *amount, const char *path) {
out:
free(di_args);
return 0;
return ret;
}
static int cmd_filesystem_resize(const struct cmd_struct *cmd,