From ed321757672f3d8b8ad0e2d40a19a9b2411d0940 Mon Sep 17 00:00:00 2001 From: Alice Guo Date: Fri, 9 Apr 2021 18:45:09 +0800 Subject: [PATCH] LF-3696: caam: fix that the caam driver cannot identify the SoC When imx8_soc_info_driver uses module_platform_driver() to regitser itself, the caam driver cannot identify the SoC in the machine because soc_id it needs has not been provided yet, so add return -EPROBE_DEFER. Signed-off-by: Alice Guo --- drivers/crypto/caam/ctrl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index fff36be5bae5..3f7a70fa2c94 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -862,6 +862,8 @@ static int caam_probe(struct platform_device *pdev) nprop = pdev->dev.of_node; imx_soc_match = soc_device_match(caam_imx_soc_table); + if (!imx_soc_match) + return -EPROBE_DEFER; caam_imx = (bool)imx_soc_match; #ifdef CONFIG_PM_SLEEP -- 2.17.1