diff options
author | Bo YU <tsu.yubo@gmail.com> | 2020-09-21 16:21:22 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-09-22 10:41:00 +0300 |
commit | 80b892fc8a90e91498babf0f6817139e5ec64b5c (patch) | |
tree | 6a2df0a46fbdc4fe75624fdc8a5ceb15c3cab584 /drivers/net/wireless/ath/ath11k/ahb.c | |
parent | 214091517f0c3ca98d3955d2c4929acb4fe346d2 (diff) | |
download | lwn-80b892fc8a90e91498babf0f6817139e5ec64b5c.tar.gz lwn-80b892fc8a90e91498babf0f6817139e5ec64b5c.zip |
ath11k: Add checked value for ath11k_ahb_remove
Return value form wait_for_completion_timeout should to be checked.
This is detected by Coverity: #CID:1464479 (CHECKED_RETURN)
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200621095136.7xdbzkthoxuw2qow@debian.debian-2
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/ahb.c')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/ahb.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index b642e52c4904..430723c64adc 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -718,12 +718,16 @@ err_core_free: static int ath11k_ahb_remove(struct platform_device *pdev) { struct ath11k_base *ab = platform_get_drvdata(pdev); + unsigned long left; reinit_completion(&ab->driver_recovery); - if (test_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags)) - wait_for_completion_timeout(&ab->driver_recovery, - ATH11K_AHB_RECOVERY_TIMEOUT); + if (test_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags)) { + left = wait_for_completion_timeout(&ab->driver_recovery, + ATH11K_AHB_RECOVERY_TIMEOUT); + if (!left) + ath11k_warn(ab, "failed to receive recovery response completion\n"); + } set_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags); cancel_work_sync(&ab->restart_work); |