summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2021-10-15 14:36:08 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-26 11:36:13 +0100
commite4a22aeaadf556afa6622a0e17c657b880221288 (patch)
tree7e74a2dfedcff20b90d7a21120b1b2ea4f04cd97 /sound
parent699758d0cad92189579349f658d469a205032556 (diff)
downloadlinux-stable-e4a22aeaadf556afa6622a0e17c657b880221288.tar.gz
linux-stable-e4a22aeaadf556afa6622a0e17c657b880221288.tar.bz2
linux-stable-e4a22aeaadf556afa6622a0e17c657b880221288.zip
ASoC: cs42l42: Defer probe if request_threaded_irq() returns EPROBE_DEFER
[ Upstream commit 0306988789d9d91a18ff70bd2bf165d3ae0ef1dd ] The driver can run without an interrupt so if devm_request_threaded_irq() failed, the probe() just carried on. But if this was EPROBE_DEFER the driver would continue without an interrupt instead of deferring to wait for the interrupt to become available. Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211015133619.4698-6-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/cs42l42.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index f9d6534d4632..9471ba17e371 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -1799,8 +1799,9 @@ static int cs42l42_i2c_probe(struct i2c_client *i2c_client,
NULL, cs42l42_irq_thread,
IRQF_ONESHOT | IRQF_TRIGGER_LOW,
"cs42l42", cs42l42);
-
- if (ret != 0)
+ if (ret == -EPROBE_DEFER)
+ goto err_disable;
+ else if (ret != 0)
dev_err(&i2c_client->dev,
"Failed to request IRQ: %d\n", ret);