From: Masahiro Yamada Date: Tue, 6 Sep 2016 13:17:37 +0000 (+0900) Subject: libfdt: simplify fdt_del_mem_rsv() X-Git-Tag: v2016.11-rc1~66 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7dc0789579b17859c61c085e4562b7985f05cc4d;p=u-boot libfdt: simplify fdt_del_mem_rsv() The variable "err" is unneeded. [ Device Tree Compiler commit: 36fd7331fb11276c09a6affc0d8cd4977f2fe100 ] Signed-off-by: Masahiro Yamada Signed-off-by: David Gibson Acked-by: Simon Glass --- diff --git a/lib/libfdt/fdt_rw.c b/lib/libfdt/fdt_rw.c index e7321ccae4..47447b2bce 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,