summaryrefslogtreecommitdiffstats
path: root/drivers/reset
diff options
context:
space:
mode:
authorRajan Vaja <rajan.vaja@xilinx.com>2019-03-04 15:18:08 -0800
committerMichal Simek <michal.simek@xilinx.com>2019-03-18 13:45:27 +0100
commit3d0313786470acb414b7d5fdd2202f061acffb02 (patch)
tree7e34a492da0da9cab34389dfa8125d2e741085ae /drivers/reset
parentb9472f7d8224460499dd7128ec944735ed5345a0 (diff)
downloadlinux-stable-3d0313786470acb414b7d5fdd2202f061acffb02.tar.gz
linux-stable-3d0313786470acb414b7d5fdd2202f061acffb02.tar.bz2
linux-stable-3d0313786470acb414b7d5fdd2202f061acffb02.zip
drivers: Defer probe if firmware is not ready
Driver needs ZynqMP firmware interface to call EEMI APIs. In case firmware is not ready, dependent drivers should wait until the firmware is ready. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Signed-off-by: Jolly Shah <jollys@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/reset')
-rw-r--r--drivers/reset/reset-zynqmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/reset/reset-zynqmp.c b/drivers/reset/reset-zynqmp.c
index 2ef1f13aa47b..99e75d92dada 100644
--- a/drivers/reset/reset-zynqmp.c
+++ b/drivers/reset/reset-zynqmp.c
@@ -79,11 +79,11 @@ static int zynqmp_reset_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
- platform_set_drvdata(pdev, priv);
-
priv->eemi_ops = zynqmp_pm_get_eemi_ops();
- if (!priv->eemi_ops)
- return -ENXIO;
+ if (IS_ERR(priv->eemi_ops))
+ return PTR_ERR(priv->eemi_ops);
+
+ platform_set_drvdata(pdev, priv);
priv->rcdev.ops = &zynqmp_reset_ops;
priv->rcdev.owner = THIS_MODULE;