lkml.org 
[lkml]   [2021]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] tools/bootconfig: Fix error return code in apply_xbc()
On Sat, 8 May 2021 11:42:16 +0800
Zhen Lei <thunder.leizhen@huawei.com> wrote:

> Fix to return a negative error code from the error handling case instead
> of 0, as done elsewhere in this function.
>
> Fixes: a995e6bc0524 ("tools/bootconfig: Fix to check the write failure correctly")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

Masami, care to ack this?

-- Steve

> ---
> tools/bootconfig/main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
> index 7362bef1a368..6cd6080cac04 100644
> --- a/tools/bootconfig/main.c
> +++ b/tools/bootconfig/main.c
> @@ -399,6 +399,7 @@ static int apply_xbc(const char *path, const char *xbc_path)
> }
> /* TODO: Ensure the @path is initramfs/initrd image */
> if (fstat(fd, &stat) < 0) {
> + ret = -errno;
> pr_err("Failed to get the size of %s\n", path);
> goto out;
> }

\
 
 \ /
  Last update: 2021-05-15 00:32    [W:0.036 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site