Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/20210508034216.2277-1-thunder.leizhen@huawei.com

Fixes: a995e6bc0524 ("tools/bootconfig: Fix to check the write failure correctly")
Reported-by: Hulk Robot <hulkci@huawei.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

authored by

Zhen Lei and committed by
Steven Rostedt (VMware)
e8ba0b2b 614124be

+1
+1
tools/bootconfig/main.c
··· 399 399 } 400 400 /* TODO: Ensure the @path is initramfs/initrd image */ 401 401 if (fstat(fd, &stat) < 0) { 402 + ret = -errno; 402 403 pr_err("Failed to get the size of %s\n", path); 403 404 goto out; 404 405 }