diff options
author | Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com> | 2022-11-07 10:29:22 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-09 14:06:01 +0100 |
commit | 9b1833170632e278971358c8c055d5960c6c7a05 (patch) | |
tree | 84ee79f0bd7819ee987b80912f5080645eb60924 /drivers/net/dsa/microchip/ksz8863_smi.c | |
parent | net: dsa: microchip: ksz8563: Add number of port irq (diff) | |
download | linux-9b1833170632e278971358c8c055d5960c6c7a05.tar.xz linux-9b1833170632e278971358c8c055d5960c6c7a05.zip |
net: dsa: microchip: add dev_err_probe in probe functions
Probe functions uses normal dev_err() to check error conditions
and print messages. Replace dev_err() with dev_err_probe() to
have more standardized format and error logging.
Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz8863_smi.c')
-rw-r--r-- | drivers/net/dsa/microchip/ksz8863_smi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/dsa/microchip/ksz8863_smi.c b/drivers/net/dsa/microchip/ksz8863_smi.c index ddb40838181e..2f4623f3bd85 100644 --- a/drivers/net/dsa/microchip/ksz8863_smi.c +++ b/drivers/net/dsa/microchip/ksz8863_smi.c @@ -152,11 +152,10 @@ static int ksz8863_smi_probe(struct mdio_device *mdiodev) ®map_smi[i], dev, &rc); if (IS_ERR(dev->regmap[i])) { - ret = PTR_ERR(dev->regmap[i]); - dev_err(&mdiodev->dev, - "Failed to initialize regmap%i: %d\n", - ksz8863_regmap_config[i].val_bits, ret); - return ret; + return dev_err_probe(&mdiodev->dev, + PTR_ERR(dev->regmap[i]), + "Failed to initialize regmap%i\n", + ksz8863_regmap_config[i].val_bits); } } |