diff options
| author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2026-06-10 12:34:32 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-10 13:24:45 +0300 |
| commit | a0df7522dfb098d56b42560247082d6f5a8581dd (patch) | |
| tree | 6f235efddd2dfd422d9ec62f5b2c7efce9b9c166 /include/linux/moduleparam.h | |
| parent | 344a12ca7ba6e10f9779476780afe9d977d47322 (diff) | |
| download | linux-a0df7522dfb098d56b42560247082d6f5a8581dd.tar.xz | |
ASoC: cs35l56: Cleanup if component_probe fails
If cs35l56_component_probe() fails, call cs35l56_component_remove() to
clean up.
All the cleanup in cs35l56_component_remove() is the same cleanup that
would need to be done (at least partially) if cs35l56_component_probe()
fails. So calling cs35l56_component_remove() avoids convoluted cleanup
gotos and duplicated code in cs35l56_component_probe().
The only action in cs35l56_component_remove() that is nominally
dependent on having completed the component_probe() action is the call
to wm_adsp2_component_remove(). Though it is currently safe to call that
even if wm_adsp2_component_probe() was not called. However,
wm_adsp2_component_probe() has been trivially updated to check itself
whether it needs to cleanup.
Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260610093432.557375-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/moduleparam.h')
0 files changed, 0 insertions, 0 deletions
