Skip to content

Commit 589c12e

Browse files
Dan Carpenterbrauner
authored andcommitted
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: a5715af ("coredump: make coredump_parse() return bool") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 7375f22 commit 589c12e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/coredump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ static bool coredump_parse(struct core_name *cn, struct coredump_params *cprm,
345345
was_space = false;
346346
err = cn_printf(cn, "%c", '\0');
347347
if (err)
348-
return err;
348+
return false;
349349
(*argv)[(*argc)++] = cn->used;
350350
}
351351
}

0 commit comments

Comments
 (0)