diff mbox

[U-Boot,v3,6/8] libfdt: simplify fdt_del_mem_rsv()

Message ID 1473167860-27465-7-git-send-email-yamada.masahiro@socionext.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada Sept. 6, 2016, 1:17 p.m. UTC
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>
---

Changes in v3: None

 lib/libfdt/fdt_rw.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Simon Glass Sept. 6, 2016, 2:23 p.m. UTC | #1
On 6 September 2016 at 07:17, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 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>
> ---
>
> Changes in v3: None
>
>  lib/libfdt/fdt_rw.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>
Tom Rini Sept. 24, 2016, 2:28 a.m. UTC | #2
On Tue, Sep 06, 2016 at 10:17:37PM +0900, Masahiro Yamada wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/lib/libfdt/fdt_rw.c b/lib/libfdt/fdt_rw.c
index e7321cc..47447b2 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,