Skip to content
Unverified Commit 7d72351a authored by Simon Trimmer's avatar Simon Trimmer Committed by Mark Brown
Browse files

ASoC: cs35l56: Rework IRQ allocation



The irq member was being set before calling the init function and then
cs35l56_irq_request() was called only when the init was successful.
However cs35l56_release() calls devm_free_irq() when the irq member is
set and therefore if init() fails then this will cause an attempted free
of an unallocated IRQ.

Instead pass the desired IRQ number to the cs35l56_irq_request()
function and set cs35l56->irq only when it has been successfully
allocated.

Signed-off-by: default avatarSimon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/168147949598.26.711670799488943454@mailman-core.alsa-project.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fc0b096c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment