netvsc: remove unnecessary check for NULL hdr
authorstephen hemminger <stephen@networkplumber.org>
Thu, 10 Aug 2017 00:46:10 +0000 (17:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Aug 2017 20:59:43 +0000 (13:59 -0700)
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>
drivers/net/hyperv/netvsc_drv.c

index 9f89de17b5fa93692935401ffba04bde3eea3e94..7b465e40869b7b8be2c4e7d821918f3fac732146 100644 (file)
@@ -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;