]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: remove redundant logical constraint.
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 3 Aug 2020 21:33:42 +0000 (23:33 +0200)
committerAndes <uboot@andestech.com>
Fri, 14 Aug 2020 06:39:09 +0000 (14:39 +0800)
After

    if (ret) return ret;

we know that ret is zero. Don't check it again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
arch/riscv/lib/andes_plic.c

index 5cf29df670cc8a8486fc39fc35f3b128bb00245a..c2a8fe4d9e9b696695df2678216bc9156513fdc4 100644 (file)
@@ -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;