Skip to content

Commit 51d13aa

Browse files
ndreysherbertx
authored andcommitted
crypto: caam - populate platform devices last
Move the call to devm_of_platform_populate() at the end of caam_probe(), so we won't try to add any child devices until all of the initialization is finished successfully. Signed-off-by: Andrey Smirnov <[email protected]> Cc: Chris Healy <[email protected]> Cc: Lucas Stach <[email protected]> Cc: Horia Geantă <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Iuliana Prodan <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 1a1c4f0 commit 51d13aa

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

drivers/crypto/caam/ctrl.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -747,12 +747,6 @@ static int caam_probe(struct platform_device *pdev)
747747
#endif
748748
}
749749

750-
ret = devm_of_platform_populate(dev);
751-
if (ret) {
752-
dev_err(dev, "JR platform devices creation error\n");
753-
return ret;
754-
}
755-
756750
ring = 0;
757751
for_each_available_child_of_node(nprop, np)
758752
if (of_device_is_compatible(np, "fsl,sec-v4.0-job-ring") ||
@@ -905,7 +899,12 @@ static int caam_probe(struct platform_device *pdev)
905899
debugfs_create_blob("tdsk", S_IRUSR | S_IRGRP | S_IROTH, ctrlpriv->ctl,
906900
&ctrlpriv->ctl_tdsk_wrap);
907901
#endif
908-
return 0;
902+
903+
ret = devm_of_platform_populate(dev);
904+
if (ret)
905+
dev_err(dev, "JR platform devices creation error\n");
906+
907+
return ret;
909908
}
910909

911910
static struct platform_driver caam_driver = {

0 commit comments

Comments
 (0)