diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-08-17 15:04:00 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2022-08-17 08:30:49 -0700 |
commit | 09e52d17b72d3a4bf6951a90ccd8c97fae04e5cf (patch) | |
tree | f0bbaa274d0708dbb4df6332ff15016c7911862a /drivers/hwmon/pmbus | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) | |
download | linux-09e52d17b72d3a4bf6951a90ccd8c97fae04e5cf.tar.gz linux-09e52d17b72d3a4bf6951a90ccd8c97fae04e5cf.tar.bz2 linux-09e52d17b72d3a4bf6951a90ccd8c97fae04e5cf.zip |
hwmon: (pmbus) Use dev_err_probe() to filter -EPROBE_DEFER error messages
devm_regulator_register() can return -EPROBE_DEFER, so better use
dev_err_probe() instead of dev_err(), it is less verbose in such a case.
It is also more informative, which can't hurt.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/3adf1cea6e32e54c0f71f4604b4e98d992beaa71.1660741419.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pmbus')
-rw-r--r-- | drivers/hwmon/pmbus/pmbus_core.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index f10bac8860fc..75cf8e20fa4d 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c @@ -3016,11 +3016,10 @@ static int pmbus_regulator_register(struct pmbus_data *data) rdev = devm_regulator_register(dev, &info->reg_desc[i], &config); - if (IS_ERR(rdev)) { - dev_err(dev, "Failed to register %s regulator\n", - info->reg_desc[i].name); - return PTR_ERR(rdev); - } + if (IS_ERR(rdev)) + return dev_err_probe(dev, PTR_ERR(rdev), + "Failed to register %s regulator\n", + info->reg_desc[i].name); } return 0; |