projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab2940a
)
ASoC: cs42l42: Switch to dev_err_probe() helper
author
Martin Povišer
<povik+lin@cutebit.org>
Thu, 15 Sep 2022 09:44:44 +0000
(11:44 +0200)
committer
Mark Brown
<broonie@kernel.org>
Mon, 19 Sep 2022 17:05:37 +0000
(18:05 +0100)
Replace dev_err() with dev_err_probe() in the probe path for consistency
with cs42l83-i2c.c.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link:
https://lore.kernel.org/r/20220915094444.11434-12-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l42-i2c.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/cs42l42-i2c.c
b/sound/soc/codecs/cs42l42-i2c.c
index 35fecff0f74ff1c1008ea8319adeffb218073b23..1900ec75576e01c8dd4d0ebc944c27833fd985ba 100644
(file)
--- a/
sound/soc/codecs/cs42l42-i2c.c
+++ b/
sound/soc/codecs/cs42l42-i2c.c
@@
-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;