Linux-Next discussions
 help / color / mirror / Atom feed
* [PATCH] ASoC: SDCA: Check devm_mutex_init() return value
@ 2025-07-22 10:27 Charles Keepax
  2025-07-22 14:33 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Keepax @ 2025-07-22 10:27 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, peter.ujfalusi,
	sfr, boqun.feng, linux-next, linux-sound, patches

From: Stephen Rothwell <sfr@canb.auug.org.au>

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>
---

As Stephen's commit was fine I have just used that with some minor
tweaks to the commit message and removing the comment, I hope this is
ok.

Thanks,
Charles

 sound/soc/sdca/sdca_interrupts.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c
index b76512732af8..d442ba2f5681 100644
--- a/sound/soc/sdca/sdca_interrupts.c
+++ b/sound/soc/sdca/sdca_interrupts.c
@@ -419,7 +419,9 @@ struct sdca_interrupt_info *sdca_irq_allocate(struct device *dev,
 
 	info->irq_chip = sdca_irq_chip;
 
-	devm_mutex_init(dev, &info->irq_lock);
+	ret = devm_mutex_init(dev, &info->irq_lock);
+	if (ret)
+		return ERR_PTR(ret);
 
 	ret = devm_regmap_add_irq_chip(dev, regmap, irq, IRQF_ONESHOT, 0,
 				       &info->irq_chip, &info->irq_data);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: SDCA: Check devm_mutex_init() return value
  2025-07-22 10:27 [PATCH] ASoC: SDCA: Check devm_mutex_init() return value Charles Keepax
@ 2025-07-22 14:33 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-07-22 14:33 UTC (permalink / raw)
  To: Charles Keepax
  Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, peter.ujfalusi,
	sfr, boqun.feng, linux-next, linux-sound, patches

On Tue, 22 Jul 2025 11:27:54 +0100, Charles Keepax wrote:
> 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.
> 
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SDCA: Check devm_mutex_init() return value
      commit: 5b838a24e9942d8b8da208f924701d0f989778cf

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-22 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 10:27 [PATCH] ASoC: SDCA: Check devm_mutex_init() return value Charles Keepax
2025-07-22 14:33 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox