Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: SDCA: Check devm_mutex_init() return value

Fix interaction with commit daec29dcc873 ("locking/mutex: Mark
devm_mutex_init() as __must_check"), add return value check. There is no
need for additional complex error handling here, failure to init the
mutex means the code can't progress, so the failure just needs to be passed
up to the caller.

Fixes: b126394d9ec6 ("ASoC: SDCA: Generic interrupt support")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250722102754.2514351-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Stephen Rothwell and committed by
Mark Brown
5b838a24 17882721

+3 -1
+3 -1
sound/soc/sdca/sdca_interrupts.c
··· 419 419 420 420 info->irq_chip = sdca_irq_chip; 421 421 422 - devm_mutex_init(dev, &info->irq_lock); 422 + ret = devm_mutex_init(dev, &info->irq_lock); 423 + if (ret) 424 + return ERR_PTR(ret); 423 425 424 426 ret = devm_regmap_add_irq_chip(dev, regmap, irq, IRQF_ONESHOT, 0, 425 427 &info->irq_chip, &info->irq_data);