diff options
author | Ye Li <ye.li@nxp.com> | 2022-05-11 11:59:13 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2022-05-11 13:26:02 +0800 |
commit | 41ae913d48b9fbffab4334ce4e39c68c5dcb3bc4 (patch) | |
tree | 05827b5819a68c059c1168787712f4e740065463 /board | |
parent | 1d56880c8359fda3a3346767835b891c1c9a9a0a (diff) |
LFU-329 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')
-rw-r--r-- | board/freescale/imx8mn_evk/spl.c | 2 | ||||
-rw-r--r-- | board/freescale/imx8mp_evk/spl.c | 2 | ||||
-rw-r--r-- | board/freescale/imx8ulp_evk/spl.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c index f8768decdd..fee5db8cf0 100644 --- a/board/freescale/imx8mn_evk/spl.c +++ b/board/freescale/imx8mn_evk/spl.c @@ -170,7 +170,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 405d9fd1d1..913e2868b9 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -69,7 +69,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 diff --git a/board/freescale/imx8ulp_evk/spl.c b/board/freescale/imx8ulp_evk/spl.c index 397a870f93..78dd44d369 100644 --- a/board/freescale/imx8ulp_evk/spl.c +++ b/board/freescale/imx8ulp_evk/spl.c @@ -180,7 +180,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); } } } |