aboutsummaryrefslogtreecommitdiff
path: root/lib/libfdt
diff options
context:
space:
mode:
authorMasahiro Yamada2016-09-06 22:17:37 +0900
committerTom Rini2016-09-23 17:53:49 -0400
commit7dc0789579b17859c61c085e4562b7985f05cc4d (patch)
treeeb21d48d9478dd5a6a236e5d5b26480d379f888a /lib/libfdt
parent0a8547a250486ca642973b295252180d7e180ab8 (diff)
libfdt: simplify fdt_del_mem_rsv()
The variable "err" is unneeded. [ Device Tree Compiler commit: 36fd7331fb11276c09a6affc0d8cd4977f2fe100 ] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/libfdt')
-rw-r--r--lib/libfdt/fdt_rw.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libfdt/fdt_rw.c b/lib/libfdt/fdt_rw.c
index e7321ccae47..47447b2bce8 100644
--- a/lib/libfdt/fdt_rw.c
+++ b/lib/libfdt/fdt_rw.c
@@ -148,17 +148,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,