提交 e0bdef0f 编写于 作者: D Dan Carpenter 提交者: Kalle Valo

mwifiex: missing error code on allocation failure

We accidentally return success instead of -ENOMEM.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册