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]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]