diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2024-01-29 18:25:56 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-02-23 17:58:02 +0300 |
commit | d92b9bcfce940ec7f330980b042d26787c9570ea (patch) | |
tree | fece93ed2c1cc6dcd3a96627569f48d7acbab501 /drivers/mfd/cs42l43-sdw.c | |
parent | ca291ea7487c281ffe268a062283064b360e8715 (diff) | |
download | linux-d92b9bcfce940ec7f330980b042d26787c9570ea.tar.xz |
mfd: cs42l43: Add some missing dev_err_probe()s
Use of dev_err_probe() was missed in the i2c and sdw parts of the code,
update the missing parts.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240129152557.3221212-5-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/cs42l43-sdw.c')
-rw-r--r-- | drivers/mfd/cs42l43-sdw.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mfd/cs42l43-sdw.c b/drivers/mfd/cs42l43-sdw.c index d6962a5a35f6..65f7b1d78248 100644 --- a/drivers/mfd/cs42l43-sdw.c +++ b/drivers/mfd/cs42l43-sdw.c @@ -171,7 +171,6 @@ static int cs42l43_sdw_probe(struct sdw_slave *sdw, const struct sdw_device_id * { struct cs42l43 *cs42l43; struct device *dev = &sdw->dev; - int ret; cs42l43 = devm_kzalloc(dev, sizeof(*cs42l43), GFP_KERNEL); if (!cs42l43) @@ -181,11 +180,9 @@ static int cs42l43_sdw_probe(struct sdw_slave *sdw, const struct sdw_device_id * cs42l43->sdw = sdw; cs42l43->regmap = devm_regmap_init_sdw(sdw, &cs42l43_sdw_regmap); - if (IS_ERR(cs42l43->regmap)) { - ret = PTR_ERR(cs42l43->regmap); - dev_err(cs42l43->dev, "Failed to allocate regmap: %d\n", ret); - return ret; - } + if (IS_ERR(cs42l43->regmap)) + return dev_err_probe(cs42l43->dev, PTR_ERR(cs42l43->regmap), + "Failed to allocate regmap\n"); return cs42l43_dev_probe(cs42l43); } |