From: stephen hemminger Date: Thu, 10 Aug 2017 00:46:10 +0000 (-0700) Subject: netvsc: remove unnecessary check for NULL hdr X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ea5a32c00bcacce1d8ac834a70a82f95a1c79425;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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;