Browse Source

libfdt: simplify fdt_del_mem_rsv()

The variable "err" is unneeded.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
Masahiro Yamada 8 years ago committed by David Gibson
parent
commit
36fd7331fb
  1. 6
      libfdt/fdt_rw.c

6
libfdt/fdt_rw.c

@ -191,17 +191,13 @@ int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size) @@ -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,

Loading…
Cancel
Save