summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/imx8
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2022-05-11 13:56:20 +0530
committerStefano Babic <sbabic@denx.de>2022-05-20 12:36:47 +0200
commitcda8f87349594a1df9cc8616e25944173c9d0a0c (patch)
tree5f7422564e3f170580dbb31e1cd4798c9427a0c2 /arch/arm/mach-imx/imx8
parent5ed4c33f36a000dfacc8c0c98d148e42235ada6e (diff)
downloadu-boot-cda8f87349594a1df9cc8616e25944173c9d0a0c.tar.gz
u-boot-cda8f87349594a1df9cc8616e25944173c9d0a0c.tar.bz2
u-boot-cda8f87349594a1df9cc8616e25944173c9d0a0c.zip
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 'arch/arm/mach-imx/imx8')
-rw-r--r--arch/arm/mach-imx/imx8/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 0858ea5f05..936c8f865a 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -100,7 +100,7 @@ int arch_misc_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);
}
return 0;