diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-19 07:21:58 -0700 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-04-26 12:28:53 +0300 |
commit | e0bdef0f75f0ee0d4747b72fa75310da78dbfa56 (patch) | |
tree | a17eca898652f41f484256f7bcd783e6c835749b /drivers/net/wireless/marvell | |
parent | 04a74a9f8af0cd61598e886c260ad0644b1dd5c0 (diff) | |
download | op-kernel-dev-e0bdef0f75f0ee0d4747b72fa75310da78dbfa56.zip op-kernel-dev-e0bdef0f75f0ee0d4747b72fa75310da78dbfa56.tar.gz |
mwifiex: missing error code on allocation failure
We accidentally return success instead of -ENOMEM.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/usb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c index 0510861..cdd8f9a 100644 --- a/drivers/net/wireless/marvell/mwifiex/usb.c +++ b/drivers/net/wireless/marvell/mwifiex/usb.c @@ -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 */ |