Skip to content

Commit 5b838a2

Browse files
sfrothwellbroonie
authored andcommitted
ASoC: SDCA: Check devm_mutex_init() return value
Fix interaction with commit daec29d ("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: b126394 ("ASoC: SDCA: Generic interrupt support") Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 1788272 commit 5b838a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sound/soc/sdca/sdca_interrupts.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,9 @@ struct sdca_interrupt_info *sdca_irq_allocate(struct device *dev,
419419

420420
info->irq_chip = sdca_irq_chip;
421421

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);
423425

424426
ret = devm_regmap_add_irq_chip(dev, regmap, irq, IRQF_ONESHOT, 0,
425427
&info->irq_chip, &info->irq_data);

0 commit comments

Comments
 (0)