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@vger.kernel.org Fixes: 10f514bd172a ("ASoC: codecs: Add WCD939x Codec driver") Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
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@linaro.org