Skip to content

Commit e8ba0b2

Browse files
Zhen Leirostedt
authored andcommitted
tools/bootconfig: Fix error return code in apply_xbc()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Link: https://lkml.kernel.org/r/[email protected] Fixes: a995e6b ("tools/bootconfig: Fix to check the write failure correctly") Reported-by: Hulk Robot <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> Signed-off-by: Zhen Lei <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 614124b commit e8ba0b2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/bootconfig/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ static int apply_xbc(const char *path, const char *xbc_path)
399399
}
400400
/* TODO: Ensure the @path is initramfs/initrd image */
401401
if (fstat(fd, &stat) < 0) {
402+
ret = -errno;
402403
pr_err("Failed to get the size of %s\n", path);
403404
goto out;
404405
}

0 commit comments

Comments
 (0)