ARM: hisi: fix error return code in hip04_smp_init()
authorWei Yongjun <weiyongjun1@huawei.com>
Sun, 5 Feb 2017 16:32:55 +0000 (16:32 +0000)
committerWei Xu <xuwei5@hisilicon.com>
Tue, 28 Mar 2017 14:30:54 +0000 (15:30 +0100)
Fix to return error code -ENODEV from the of_find_compatible_node()
error handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
arch/arm/mach-hisi/platmcpm.c

index a6c117622d67619ae4eccc7f720b785878935585..f66815c3dd07e4708e8a4f7dd1a19f733c0b35a8 100644 (file)
@@ -279,6 +279,8 @@ static int __init hip04_smp_init(void)
                                         &hip04_boot_method[0], 4);
        if (ret)
                goto err;
+
+       ret = -ENODEV;
        np_sctl = of_find_compatible_node(NULL, NULL, "hisilicon,sysctrl");
        if (!np_sctl)
                goto err;