ASoC: adau1372: Fix error handling in adau1372_set_power()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 5 repliesIn review
- v12 patches 1 replySuperseded
Changes in v2 from the cover letter
- [1/2]: No changes.
- [2/2]: Also unwind regcache and GPIO power-down state on PLL lock failure, as noted by Mark Brown.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ASoC: adau1372: Fix unchecked clk_prepare_enable() return valuesound/ | +10 | 1 reply | |
| 2/2 | ASoC: adau1372: Fix clock leak on PLL lock failuresound/ | +14 | 1 reply |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Nuno Sá |
|---|---|
| Series | R-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] ASoC: adau1372: Fix error handling in adau1372_set_power()
adau1372_set_power() had two related error handling issues in its enable
path: clk_prepare_enable() was called but its return value discarded, and adau1372_enable_pll() was a void function that silently swallowed lock failures, leaving mclk enabled and adau1372->enabled set to true despite the device being in a broken state.
Patch 1 fixes the unchecked clk_prepare_enable() by making adau1372_set_power() return int and propagating the error.
Patch 2 converts adau1372_enable_pll() to return int and adds a full unwind in adau1372_set_power() if PLL lock fails, reversing the regcache, GPIO power-down, and clock state.
Changes in v2:
- [1/2]: No changes.
- [2/2]: Also unwind regcache and GPIO power-down state on PLL lock failure, as noted by Mark Brown.
Jihed Chaibi (2):
ASoC: adau1372: Fix unchecked clk_prepare_enable() return value
ASoC: adau1372: Fix clock leak on PLL lock failure
sound/soc/codecs/adau1372.c | 34 ++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 10 deletions(-)
--
2.47.3