mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
ath11k: Fix an error handling path
[ Upstream commite7bcc145bc] If 'kzalloc' fails, we must return an error code. While at it, remove a useless initialization of 'err' which could hide the issue. Fixes:d5c65159f2("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
08c7e56154
commit
01c0691ead
@@ -1585,15 +1585,17 @@ static int ath11k_qmi_fw_ind_register_send(struct ath11k_base *ab)
|
||||
struct qmi_wlanfw_ind_register_resp_msg_v01 *resp;
|
||||
struct qmi_handle *handle = &ab->qmi.handle;
|
||||
struct qmi_txn txn;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
req = kzalloc(sizeof(*req), GFP_KERNEL);
|
||||
if (!req)
|
||||
return -ENOMEM;
|
||||
|
||||
resp = kzalloc(sizeof(*resp), GFP_KERNEL);
|
||||
if (!resp)
|
||||
if (!resp) {
|
||||
ret = -ENOMEM;
|
||||
goto resp_out;
|
||||
}
|
||||
|
||||
req->client_id_valid = 1;
|
||||
req->client_id = QMI_WLANFW_CLIENT_ID;
|
||||
|
||||
Reference in New Issue
Block a user