mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 00:24:12 +08:00
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>
This commit is contained in:
parent
b407589583
commit
28a3fb26e8
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user