diff options
author | Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com> | 2022-11-07 14:59:22 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-09 13:06:01 +0000 |
commit | 9b1833170632e278971358c8c055d5960c6c7a05 (patch) | |
tree | 84ee79f0bd7819ee987b80912f5080645eb60924 /drivers/net/dsa/microchip/ksz9477_i2c.c | |
parent | 4630d1420f841b2b112928359c4dc148d9a7d1f8 (diff) |
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/ksz9477_i2c.c')
-rw-r--r-- | drivers/net/dsa/microchip/ksz9477_i2c.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/dsa/microchip/ksz9477_i2c.c b/drivers/net/dsa/microchip/ksz9477_i2c.c index caa9acf1495c..db4aec0a51dc 100644 --- a/drivers/net/dsa/microchip/ksz9477_i2c.c +++ b/drivers/net/dsa/microchip/ksz9477_i2c.c @@ -30,11 +30,9 @@ static int ksz9477_i2c_probe(struct i2c_client *i2c, rc.lock_arg = &dev->regmap_mutex; dev->regmap[i] = devm_regmap_init_i2c(i2c, &rc); if (IS_ERR(dev->regmap[i])) { - ret = PTR_ERR(dev->regmap[i]); - dev_err(&i2c->dev, - "Failed to initialize regmap%i: %d\n", - ksz9477_regmap_config[i].val_bits, ret); - return ret; + return dev_err_probe(&i2c->dev, PTR_ERR(dev->regmap[i]), + "Failed to initialize regmap%i\n", + ksz9477_regmap_config[i].val_bits); } } |