]> git.baikalelectronics.ru Git - kernel.git/commit
ath11k: fix missing error check on call to ath11k_pci_get_user_msi_assignment
authorColin Ian King <colin.king@canonical.com>
Wed, 19 Aug 2020 11:14:52 +0000 (12:14 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 31 Aug 2020 15:16:38 +0000 (18:16 +0300)
commitf8f6ae7480d780cdb3260d53fe455e1e10411656
tree7fcb5e1c6c8e46ba082a9f7c02bd6c52ab29c379
parent1508dd291d9206543fe13f794f474d9cdd62cccb
ath11k: fix missing error check on call to ath11k_pci_get_user_msi_assignment

The return error check on the call to ath11k_pci_get_user_msi_assignment is
missing.  If an error does occur, num_vectors is still set to zero and
later on a division by zero can occur when variable vector is being
calculated.  Fix this by adding an error check after the call.

Addresses-Coverity: ("Division or modulo by zero")
Fixes: e92923ecba2f ("ath11k: enable DP interrupt setup for QCA6390")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200819111452.52419-1-colin.king@canonical.com
drivers/net/wireless/ath/ath11k/pci.c