Re: [PATCH] fdt_rw.c: Fix Unchecked return value error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Mar 1, 2021 at 4:27 PM Ryan Long <thisisryanlong@xxxxxxxxx> wrote:
>
> Fixed "Unchecked return value" error, by adding "(void)" in front of the
> function call.

You don't need cover letters for single patches. Move the explanation
here because it's a lot better at explaining the why. The what is not
needed here so much because we can read what the patch does.

You also need a S-o-b.

> ---
>  cpukit/dtc/libfdt/fdt_rw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cpukit/dtc/libfdt/fdt_rw.c b/cpukit/dtc/libfdt/fdt_rw.c
> index 1385425..cdae5dd 100644
> --- a/cpukit/dtc/libfdt/fdt_rw.c
> +++ b/cpukit/dtc/libfdt/fdt_rw.c
> @@ -348,7 +348,7 @@ int fdt_add_subnode_namelen(void *fdt, int parentoffset,
>                 return offset;
>
>         /* Try to place the new node after the parent's properties */
> -       fdt_next_tag(fdt, parentoffset, &nextoffset); /* skip the BEGIN_NODE */
> +       (void) fdt_next_tag(fdt, parentoffset, &nextoffset); /* skip the BEGIN_NODE */

Can't we just actually check the error here?

>         do {
>                 offset = nextoffset;
>                 tag = fdt_next_tag(fdt, offset, &nextoffset);
> --
> 1.8.3.1
>




[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux