Re: [PATCH] ASoC: codecs: wcd939x: Fix typec mux and switch leak during device removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/07/2024 14:26, Krzysztof Kozlowski wrote:
Driver does not unregister typec structures (typec_mux_dev and
typec_switch_desc) during removal leading to leaks.  Fix this by moving
typec registering parts to separate function and using devm interface to
release them.  This also makes code a bit simpler:
  - Smaller probe() function with less error paths and no #ifdefs,
  - No need to store typec_mux_dev and typec_switch_desc in driver state
    container structure.

Cc: <stable@xxxxxxxxxxxxxxx>
Fixes: 10f514bd172a ("ASoC: codecs: Add WCD939x Codec driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>

---

Not tested on hardware.
---
  sound/soc/codecs/wcd939x.c | 113 ++++++++++++++++++++++---------------
  1 file changed, 66 insertions(+), 47 deletions(-)


<snip>

Looks good!


Reviewed-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux