ath11k: Fix an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 24 Nov 2020 15:59:16 +0000 (17:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:29 +0000 (11:53 +0100)
commit01c0691ead1e2ac8169459c8dbc05761bcf55145
tree823dec425c9293e3af9a0fb4bf1dc6713edfa965
parent08c7e5615496a5ed9f1c80bcd710b677946f9d7e
ath11k: Fix an error handling path

[ Upstream commit e7bcc145bcd035e56da7b97b033c463b32a5ff80 ]

If 'kzalloc' fails, we must return an error code.

While at it, remove a useless initialization of 'err' which could hide the
issue.

Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201122173943.1366167-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath11k/qmi.c