mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
dpaa2-ptp: defer probe when portal allocation failed
[ Upstream commit 5500598abb ]
The fsl_mc_portal_allocate can fail when the requested MC portals are
not yet probed by the fsl_mc_allocator. In this situation, the driver
should defer the probe.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4ee24ae83c
commit
3a11ec548c
@@ -142,7 +142,10 @@ static int rtc_probe(struct fsl_mc_device *mc_dev)
|
||||
|
||||
err = fsl_mc_portal_allocate(mc_dev, 0, &mc_dev->mc_io);
|
||||
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_exit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user