projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3544f9f
)
mwifiex: usb: return an error if kmalloc fails
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 4 Aug 2015 07:49:27 +0000
(10:49 +0300)
committer
Kalle Valo
<kvalo@codeaurora.org>
Thu, 13 Aug 2015 12:33:25 +0000
(15:33 +0300)
The current code returns success if kmalloc fails.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mwifiex/usb.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/wireless/mwifiex/usb.c
b/drivers/net/wireless/mwifiex/usb.c
index fbad99c503078ab9e2e840da438892a2067e92aa..f866d5da222b1ae69dce88bec5d1f606b3380d01 100644
(file)
--- a/
drivers/net/wireless/mwifiex/usb.c
+++ b/
drivers/net/wireless/mwifiex/usb.c
@@
-870,8
+870,10
@@
static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,
/* Allocate memory for transmit */
fwdata = kzalloc(FW_DNLD_TX_BUF_SIZE, GFP_KERNEL);
- if (!fwdata)
+ if (!fwdata) {
+ ret = -ENOMEM;
goto fw_exit;
+ }
/* Allocate memory for receive */
recv_buff = kzalloc(FW_DNLD_RX_BUF_SIZE, GFP_KERNEL);