MLK-23948-1 imx8: fdt: directly return when no entry for smmu
authorPeng Fan <peng.fan@nxp.com>
Thu, 7 May 2020 03:00:38 +0000 (11:00 +0800)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 10:26:01 +0000 (03:26 -0700)
break will let the function return -ENOENT, and cause
boot error. Return 0 to fix the issue.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit f619c8509f91c5691376720fba7ce2a0109d7f5c)
(cherry picked from commit 71b6e7a57b1f75125cbf1134b0f8b3b0be342f4a)

arch/arm/mach-imx/imx8/fdt.c

index a05f3c0..8c9cf36 100644 (file)
@@ -500,16 +500,16 @@ static int config_smmu_fdt_device_sid(void *blob, int device_offset, int sid)
                                                     "#power-domain-cells",
                                                     0, i++, &args);
                if (ret == -ENOENT) {
-                       break;
+                       return 0;
                } else if (ret) {
                        printf("Parse power-domains of node %s wrong: %d\n",
                               fdt_get_name(blob, device_offset, NULL), ret);
                        continue;
                }
 
+               rsrc = args.args[0];
                debug("configure node %s sid 0x%x rsrc=%d\n",
                      name, sid, rsrc);
-               rsrc = args.args[0];
 
                ret = config_smmu_resource_sid(rsrc, sid);
                if (ret)