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 4ed38ea..f13e0ac 100644 (file)
@@ -1094,9 +1094,7 @@ close:
        vmbus_close(device->channel);
 
 cleanup:
-
-       if (net_device)
-               kfree(net_device);
+       kfree(net_device);
 
        return ret;
 }