diff mbox series

[RFC,v1,2/3] caam: add defer probe when the caam driver cannot identify SoC

Message ID 20210419042722.27554-3-alice.guo@oss.nxp.com
State New
Headers show
Series support soc_device_match to return -EPROBE_DEFER | expand

Commit Message

Alice Guo (OSS) April 19, 2021, 4:27 a.m. UTC
From: Alice Guo <alice.guo@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.guo@nxp.com>
 drivers/crypto/caam/ctrl.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series


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) {