Commit e0bdef0f authored by Dan Carpenter's avatar Dan Carpenter Committed by Kalle Valo

mwifiex: missing error code on allocation failure

We accidentally return success instead of -ENOMEM.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 04a74a9f
......@@ -1017,8 +1017,10 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
/* Allocate memory for receive */
recv_buff = kzalloc(FW_DNLD_RX_BUF_SIZE, GFP_KERNEL);
if (!recv_buff)
if (!recv_buff) {
ret = -ENOMEM;
goto cleanup;
}
do {
/* Send pseudo data to check winner status first */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment