summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-08-19 12:41:15 +0300
committerChristian Brauner <brauner@kernel.org>2025-08-19 13:51:28 +0200
commit589c12edcd8a7b3b24f407b58443bab3560125e4 (patch)
treed676edf111a3680e082e568a46785550b18574b7
parent7375f22495e7cd1c5b3b5af9dcc4f6dffe34ce49 (diff)
coredump: Fix return value in coredump_parse()
The coredump_parse() function is bool type. It should return true on success and false on failure. The cn_printf() returns zero on success or negative error codes. This mismatch means that when "return err;" here, it is treated as success instead of failure. Change it to return false instead. Fixes: a5715af549b2 ("coredump: make coredump_parse() return bool") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/aKRGu14w5vPSZLgv@stanley.mountain Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--fs/coredump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index fedbead956ed..5dce257c67fc 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -345,7 +345,7 @@ static bool coredump_parse(struct core_name *cn, struct coredump_params *cprm,
was_space = false;
err = cn_printf(cn, "%c", '\0');
if (err)
- return err;
+ return false;
(*argv)[(*argc)++] = cn->used;
}
}