]> git.sur5r.net Git - u-boot/commitdiff
libfdt: simplify fdt_del_mem_rsv()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 6 Sep 2016 13:17:37 +0000 (22:17 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 23 Sep 2016 21:53:49 +0000 (17:53 -0400)
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>
lib/libfdt/fdt_rw.c

index e7321ccae478741277d9d0af29f0e7ce8e8b9517..47447b2bce876c966b40a64b788abe9ec784d432 100644 (file)
@@ -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,