aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorYang Yingliang2022-09-14 21:33:54 +0800
committerMark Brown2022-09-14 15:06:01 +0100
commit28a3fb26e83e013c929a2e1185743ece7e8173ff (patch)
tree8de87f678657a96ea6d206e8fd1d91b5fe64e508 /sound
parentb407589583da08405a19f4b0139d128e1ae41658 (diff)
ASoC: cs42l42: Switch to use dev_err_probe() helper
dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220914133355.3779364-2-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/cs42l42.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index de1e276bdf7d..162540c153f9 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -2262,11 +2262,9 @@ static int cs42l42_i2c_probe(struct i2c_client *i2c_client)
NULL, cs42l42_irq_thread,
IRQF_ONESHOT | IRQF_TRIGGER_LOW,
"cs42l42", cs42l42);
- if (ret == -EPROBE_DEFER) {
- goto err_disable_noirq;
- } else if (ret != 0) {
- dev_err(&i2c_client->dev,
- "Failed to request IRQ: %d\n", ret);
+ if (ret) {
+ dev_err_probe(&i2c_client->dev, ret,
+ "Failed to request IRQ\n");
goto err_disable_noirq;
}
}