staging: dpaa2-evb: Defer probe if no mc portal is found
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
ee1e0a3441
commit
a9744edd0f
|
@ -1206,10 +1206,14 @@ static int evb_probe(struct fsl_mc_device *evb_dev)
|
||||||
|
|
||||||
err = fsl_mc_portal_allocate(evb_dev, FSL_MC_IO_ATOMIC_CONTEXT_PORTAL,
|
err = fsl_mc_portal_allocate(evb_dev, FSL_MC_IO_ATOMIC_CONTEXT_PORTAL,
|
||||||
&priv->mc_io);
|
&priv->mc_io);
|
||||||
if (unlikely(err)) {
|
if (err) {
|
||||||
dev_err(dev, "fsl_mc_portal_allocate err %d\n", err);
|
if (err == -ENXIO)
|
||||||
|
err = -EPROBE_DEFER;
|
||||||
|
else
|
||||||
|
dev_err(dev, "fsl_mc_portal_allocate err %d\n", err);
|
||||||
goto err_free_netdev;
|
goto err_free_netdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!priv->mc_io) {
|
if (!priv->mc_io) {
|
||||||
dev_err(dev, "fsl_mc_portal_allocate returned null handle but no error\n");
|
dev_err(dev, "fsl_mc_portal_allocate returned null handle but no error\n");
|
||||||
err = -EFAULT;
|
err = -EFAULT;
|
||||||
|
|
Loading…
Reference in New Issue