1 From f1009dfec7c439a958bd9ed8893dd6aa692c61f5 Mon Sep 17 00:00:00 2001
2 From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
3 Date: Wed, 23 Jul 2014 09:00:35 +0800
4 Subject: [PATCH 23/25] hyperv: Fix error return code in netvsc_init_buf()
6 Fix to return -ENOMEM from the kalloc error handling
9 Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
10 Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
13 drivers/net/hyperv/netvsc.c | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
16 diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
17 index 4ed38eaecea8..d97d5f39a04e 100644
18 --- a/drivers/net/hyperv/netvsc.c
19 +++ b/drivers/net/hyperv/netvsc.c
20 @@ -378,8 +378,10 @@ static int netvsc_init_buf(struct hv_device *device)
22 net_device->send_section_map =
23 kzalloc(net_device->map_words * sizeof(ulong), GFP_KERNEL);
24 - if (net_device->send_section_map == NULL)
25 + if (net_device->send_section_map == NULL) {