Commit ac088c31 authored by Martin Povišer's avatar Martin Povišer Committed by Mark Brown

ASoC: cs42l42: Switch to dev_err_probe() helper

Replace dev_err() with dev_err_probe() in the probe path for consistency
with cs42l83-i2c.c.
Signed-off-by: default avatarMartin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220915094444.11434-12-povik+lin@cutebit.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ab2940a7
......@@ -25,11 +25,9 @@ static int cs42l42_i2c_probe(struct i2c_client *i2c_client)
return -ENOMEM;
regmap = devm_regmap_init_i2c(i2c_client, &cs42l42_regmap);
if (IS_ERR(regmap)) {
ret = PTR_ERR(regmap);
dev_err(&i2c_client->dev, "regmap_init() failed: %d\n", ret);
return ret;
}
if (IS_ERR(regmap))
return dev_err_probe(&i2c_client->dev, PTR_ERR(regmap),
"regmap_init() failed\n");
cs42l42->devid = CS42L42_CHIP_ID;
cs42l42->dev = dev;
......
Markdown is supported
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