Commit bd4578bc authored by Fabian Frederick's avatar Fabian Frederick Committed by David S. Miller

drivers/net/hyperv/netvsc.c: remove unnecessary null test before kfree

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: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 179d80af
...@@ -1094,9 +1094,7 @@ int netvsc_device_add(struct hv_device *device, void *additional_info) ...@@ -1094,9 +1094,7 @@ int netvsc_device_add(struct hv_device *device, void *additional_info)
vmbus_close(device->channel); vmbus_close(device->channel);
cleanup: cleanup:
kfree(net_device);
if (net_device)
kfree(net_device);
return ret; return ret;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment