Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 */