Skip to content
Commit 538b7b8f authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Greg Kroah-Hartman
Browse files

net: stmmac: use dev_err_probe() for reporting mdio bus registration failure



[ Upstream commit 839612d2 ]

I have a board where these two lines are always printed during boot:

   imx-dwmac 30bf0000.ethernet: Cannot register the MDIO bus
   imx-dwmac 30bf0000.ethernet: stmmac_dvr_probe: MDIO bus (id: 1) registration failed

It's perfectly fine, and the device is successfully (and silently, as
far as the console goes) probed later.

Use dev_err_probe() instead, which will demote these messages to debug
level (thus removing the alarming messages from the console) when the
error is -EPROBE_DEFER, and also has the advantage of including the
error code if/when it happens to be something other than -EPROBE_DEFER.

While here, add the missing \n to one of the format strings.

Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20220602074840.1143360-1-linux@rasmusvillemoes.dk


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Stable-dep-of: e23c0d21 ("net: stmmac: Handle disabled MDIO busses from devicetree")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 067e6ec9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment