diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c index c995f2900859..529040f3ece4 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -1167,10 +1167,9 @@ int otx2_register_mbox_intr(struct otx2_nic *pf, bool probe_af) } err = otx2_sync_mbox_msg(&pf->mbox); if (err) { - dev_warn(pf->dev, - "AF not responding to mailbox, deferring probe\n"); otx2_disable_mbox_intr(pf); - return -EPROBE_DEFER; + return dev_err_probe(pf->dev, -EPROBE_DEFER, + "AF not responding to mailbox, deferring probe\n"); } return 0; @@ -2993,11 +2992,9 @@ int otx2_check_pf_usable(struct otx2_nic *nic) * otherwise this driver probe should be deferred * until AF driver comes up. */ - if (!rev) { - dev_warn(nic->dev, + if (!rev) + return dev_err_probe(nic->dev, -EPROBE_DEFER, "AF is not initialized, deferring probe\n"); - return -EPROBE_DEFER; - } return 0; } diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c index fcdf891f90b5..a02267978583 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c @@ -297,10 +297,9 @@ static int otx2vf_register_mbox_intr(struct otx2_nic *vf, bool probe_pf) err = otx2_sync_mbox_msg(&vf->mbox); if (err) { - dev_warn(vf->dev, - "AF not responding to mailbox, deferring probe\n"); otx2vf_disable_mbox_intr(vf); - return -EPROBE_DEFER; + return dev_err_probe(vf->dev, -EPROBE_DEFER, + "AF not responding to mailbox, deferring probe\n"); } return 0; }