diff options
author | Krzysztof Kozlowski <[email protected]> | 2024-07-01 14:26:16 +0200 |
---|---|---|
committer | Mark Brown <[email protected]> | 2024-07-04 12:42:24 +0100 |
commit | 9f3ae72c5dbca9ba558c752f1ef969ed6908be01 (patch) | |
tree | 4607196d55ffdc46f5433042d0e3f67441b255a8 /lib/crypto/mpi/mpi-mul.c | |
parent | 1e0dff741b0a8af35645e5c3ffc4050893002a9c (diff) |
ASoC: codecs: wcd939x: Fix typec mux and switch leak during device removal
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: [email protected]
Fixes: 10f514bd172a ("ASoC: codecs: Add WCD939x Codec driver")
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions