diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-05-13 22:14:54 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-05-19 09:54:53 +0300 |
commit | 25ca180ad380a0c7286442a922e7fbcc6a9f6083 (patch) | |
tree | 55d9739435ae1e3a81600afe9d819cf2dfa65307 /drivers/net/wireless/ath/ath9k/recv.c | |
parent | wcn36xx: Replace zero-length array with flexible-array (diff) | |
download | wireguard-linux-25ca180ad380a0c7286442a922e7fbcc6a9f6083.tar.xz wireguard-linux-25ca180ad380a0c7286442a922e7fbcc6a9f6083.zip |
ath11k: Fix some resource leaks in error path in 'ath11k_thermal_register()'
If 'thermal_cooling_device_register()' fails, we must undo what has been
allocated so far. So we must go to 'err_thermal_destroy' instead of
returning directly
In case of error in 'ath11k_thermal_register()', the previous
'thermal_cooling_device_register()' call must also be undone. Move the
'ar->thermal.cdev = cdev' a few lines above in order for this to be done
in 'ath11k_thermal_unregister()' which is called in the error handling
path.
Fixes: 2a63bbca06b2 ("ath11k: add thermal cooling device support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200513201454.258111-1-christophe.jaillet@wanadoo.fr
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/recv.c')
0 files changed, 0 insertions, 0 deletions