aboutsummaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorYe Li2022-05-11 13:56:20 +0530
committerStefano Babic2022-05-20 12:36:47 +0200
commitcda8f87349594a1df9cc8616e25944173c9d0a0c (patch)
tree5f7422564e3f170580dbb31e1cd4798c9427a0c2 /board/freescale
parent5ed4c33f36a000dfacc8c0c98d148e42235ada6e (diff)
caam: Fix crash in case caam_jr_probe failed
If probing caam_jr returns failure, the variable "dev" will not be initialized, so we can't use dev->name for the error print. Otherwise it will cause crash. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/imx8mm_evk/spl.c2
-rw-r--r--board/freescale/imx8mn_evk/spl.c2
-rw-r--r--board/freescale/imx8mp_evk/spl.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index ae2fb73fc51..4d963246856 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -57,7 +57,7 @@ void spl_board_init(void)
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
if (ret)
- printf("Failed to initialize %s: %d\n", dev->name, ret);
+ printf("Failed to initialize caam_jr: %d\n", ret);
}
puts("Normal Boot\n");
}
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index 3d9aa56d2c0..14cb51368f8 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -52,7 +52,7 @@ void spl_board_init(void)
if (IS_ENABLED(CONFIG_FSL_CAAM)) {
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
if (ret)
- printf("Failed to initialize %s: %d\n", dev->name, ret);
+ printf("Failed to initialize caam_jr: %d\n", ret);
}
puts("Normal Boot\n");
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index a2732148f24..719b1f6d7da 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -43,7 +43,7 @@ void spl_board_init(void)
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
if (ret)
- printf("Failed to initialize %s: %d\n", dev->name, ret);
+ printf("Failed to initialize caam_jr: %d\n", ret);
}
/*
* Set GIC clock to 500Mhz for OD VDD_SOC. Kernel driver does