public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: fi resize: fix return value check_resize_args()
@ 2022-08-11 15:22 Sidong Yang
  2022-08-23 20:42 ` David Sterba
  2022-09-12  7:58 ` Wang Yugui
  0 siblings, 2 replies; 4+ messages in thread
From: Sidong Yang @ 2022-08-11 15:22 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Sidong Yang

check_resize_args() function checks user argument amount and should
returns it's validity. But now the code returns only zero. This patch
make it correct to return ret.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
---
 cmds/filesystem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmds/filesystem.c b/cmds/filesystem.c
index 7cd08fcd..9eff5680 100644
--- a/cmds/filesystem.c
+++ b/cmds/filesystem.c
@@ -1203,7 +1203,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,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-12 12:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-11 15:22 [PATCH] btrfs-progs: fi resize: fix return value check_resize_args() Sidong Yang
2022-08-23 20:42 ` David Sterba
2022-09-12  7:58 ` Wang Yugui
2022-09-12 12:34   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox