From: Alice Guo <alice....@nxp.com>

When imx8_soc_info_driver uses module_platform_driver() to regitser
itself, the caam driver cannot identify the SoC in the machine because
the SoC driver is probed later, so that add return -EPROBE_DEFER.

Signed-off-by: Alice Guo <alice....@nxp.com>
---
 drivers/crypto/caam/ctrl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index ca0361b2dbb0..d08f8cc4131f 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -635,6 +635,9 @@ static int caam_probe(struct platform_device *pdev)
        nprop = pdev->dev.of_node;
 
        imx_soc_match = soc_device_match(caam_imx_soc_table);
+       if (IS_ERR(imx_soc_match))
+               return PTR_ERR(imx_soc_match);
+
        caam_imx = (bool)imx_soc_match;
 
        if (imx_soc_match) {
-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to