[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220915094444.11434-12-povik+lin@cutebit.org>
Date: Thu, 15 Sep 2022 11:44:44 +0200
From: Martin Povišer <povik+lin@...ebit.org>
To: James Schulman <james.schulman@...rus.com>,
David Rhodes <david.rhodes@...rus.com>,
Lucas Tanure <tanureal@...nsource.cirrus.com>,
Richard Fitzgerald <rf@...nsource.cirrus.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Martin Povišer <povik+lin@...ebit.org>
Cc: Charles Keepax <ckeepax@...nsource.cirrus.com>,
ChiYuan Huang <cy_huang@...htek.com>,
Matt Flax <flatmax@...tmax.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
- <patches@...nsource.cirrus.com>, alsa-devel@...a-project.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
asahi@...ts.linux.dev
Subject: [PATCH v2 11/11] 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: Martin Povišer <povik+lin@...ebit.org>
---
sound/soc/codecs/cs42l42-i2c.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/cs42l42-i2c.c b/sound/soc/codecs/cs42l42-i2c.c
index 35fecff0f74f..1900ec75576e 100644
--- 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;
--
2.33.0
Powered by blists - more mailing lists