diff options
author | stephen hemminger <stephen@networkplumber.org> | 2017-08-09 17:46:10 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-11 13:59:43 -0700 |
commit | ea5a32c00bcacce1d8ac834a70a82f95a1c79425 (patch) | |
tree | fbb786e75fa6847e77ea1502f4642ea0df399fa9 /drivers/net | |
parent | 00f5024e821e60c0d1d7df44f2577a2c277b5cc9 (diff) |
netvsc: remove unnecessary check for NULL hdr
The function init_page_array is always called with a valid pointer
to RNDIS header. No check for NULL is needed.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 9f89de17b5fa..7b465e40869b 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -333,10 +333,9 @@ static u32 init_page_array(void *hdr, u32 len, struct sk_buff *skb, * 2. skb linear data * 3. skb fragment data */ - if (hdr != NULL) - slots_used += fill_pg_buf(virt_to_page(hdr), - offset_in_page(hdr), - len, &pb[slots_used]); + slots_used += fill_pg_buf(virt_to_page(hdr), + offset_in_page(hdr), + len, &pb[slots_used]); packet->rmsg_size = len; packet->rmsg_pgcnt = slots_used; |