mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
wifi: ath12k: Fix locking in "QMI firmware ready" error paths
If ag->mutex has been locked, unlock it before returning. If it has not
been locked, do not unlock it before returning. These bugs have been
detected by the Clang thread-safety analyzer.
Cc: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Cc: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Fixes: ee146e11b4 ("wifi: ath12k: refactor core start based on hardware group")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Link: https://patch.msgid.link/20250206221317.3845663-1-bvanassche@acm.org
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
parent
2f50de7256
commit
b9c7299a33
|
|
@ -1132,16 +1132,18 @@ int ath12k_core_qmi_firmware_ready(struct ath12k_base *ab)
|
|||
ath12k_core_stop(ab);
|
||||
mutex_unlock(&ab->core_lock);
|
||||
}
|
||||
mutex_unlock(&ag->mutex);
|
||||
goto exit;
|
||||
|
||||
err_dp_free:
|
||||
ath12k_dp_free(ab);
|
||||
mutex_unlock(&ab->core_lock);
|
||||
mutex_unlock(&ag->mutex);
|
||||
|
||||
err_firmware_stop:
|
||||
ath12k_qmi_firmware_stop(ab);
|
||||
|
||||
exit:
|
||||
mutex_unlock(&ag->mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user