Re: [PATCH] libfdt: simplify fdt_del_mem_rsv()

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



On Mon, Aug 22, 2016 at 06:55:49PM +0900, Masahiro Yamada wrote:
> The variable "err" is unneeded.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>

Applied, thanks.

> ---
>  libfdt/fdt_rw.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/libfdt/fdt_rw.c b/libfdt/fdt_rw.c
> index 8be02b1..2eed4f5 100644
> --- a/libfdt/fdt_rw.c
> +++ b/libfdt/fdt_rw.c
> @@ -191,17 +191,13 @@ int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size)
>  int fdt_del_mem_rsv(void *fdt, int n)
>  {
>  	struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n);
> -	int err;
>  
>  	FDT_RW_CHECK_HEADER(fdt);
>  
>  	if (n >= fdt_num_mem_rsv(fdt))
>  		return -FDT_ERR_NOTFOUND;
>  
> -	err = _fdt_splice_mem_rsv(fdt, re, 1, 0);
> -	if (err)
> -		return err;
> -	return 0;
> +	return _fdt_splice_mem_rsv(fdt, re, 1, 0);
>  }
>  
>  static int _fdt_resize_property(void *fdt, int nodeoffset, const char *name,

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[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