projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
332cfc8
)
hyperv: Fix error return code in netvsc_init_buf()
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Wed, 23 Jul 2014 01:00:35 +0000
(09:00 +0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 23 Jul 2014 21:55:47 +0000
(14:55 -0700)
Fix to return -ENOMEM from the kalloc error handling
case instead of 0.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc.c
patch
|
blob
|
history
diff --git
a/drivers/net/hyperv/netvsc.c
b/drivers/net/hyperv/netvsc.c
index 4ed38eaecea805b72349f64b8dede105b5a4fcf4..d97d5f39a04e4a307bb1e5b53eaab18a85b6b828 100644
(file)
--- a/
drivers/net/hyperv/netvsc.c
+++ b/
drivers/net/hyperv/netvsc.c
@@
-378,8
+378,10
@@
static int netvsc_init_buf(struct hv_device *device)
net_device->send_section_map =
kzalloc(net_device->map_words * sizeof(ulong), GFP_KERNEL);
- if (net_device->send_section_map == NULL)
+ if (net_device->send_section_map == NULL) {
+ ret = -ENOMEM;
goto cleanup;
+ }
goto exit;