drivers/net/hyperv/netvsc.c: remove unnecessary null test before kfree
authorFabian Frederick <fabf@skynet.be>
Sat, 28 Jun 2014 18:44:19 +0000 (20:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jul 2014 01:22:25 +0000 (18:22 -0700)
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc.c

index 4ed38eaecea805b72349f64b8dede105b5a4fcf4..f13e0acc8a69ea6bd3975ef2e0c76d3fb831cf6f 100644 (file)
@@ -1094,9 +1094,7 @@ close:
        vmbus_close(device->channel);
 
 cleanup:
-
-       if (net_device)
-               kfree(net_device);
+       kfree(net_device);
 
        return ret;
 }