From: Heinrich Schuchardt Date: Mon, 3 Aug 2020 21:33:42 +0000 (+0200) Subject: riscv: remove redundant logical constraint. X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=023dba13668756e54ac4522543d91840f8f34db5;p=u-boot.git riscv: remove redundant logical constraint. After if (ret) return ret; we know that ret is zero. Don't check it again. Signed-off-by: Heinrich Schuchardt Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- diff --git a/arch/riscv/lib/andes_plic.c b/arch/riscv/lib/andes_plic.c index 5cf29df670..c2a8fe4d9e 100644 --- a/arch/riscv/lib/andes_plic.c +++ b/arch/riscv/lib/andes_plic.c @@ -52,7 +52,7 @@ static int init_plic(void) if (ret) return ret; - if (ret == 0 && dev) { + if (dev) { ofnode_for_each_subnode(node, dev_ofnode(dev->parent)) { const char *device_type;