Commit aa99c479 authored by Markus Elfring's avatar Markus Elfring Committed by David S. Miller

net: Hyper-V: Deletion of an unnecessary check before the function call "vfree"

The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3fedeab1
...@@ -561,9 +561,7 @@ int netvsc_device_remove(struct hv_device *device) ...@@ -561,9 +561,7 @@ int netvsc_device_remove(struct hv_device *device)
vmbus_close(device->channel); vmbus_close(device->channel);
/* Release all resources */ /* Release all resources */
if (net_device->sub_cb_buf) vfree(net_device->sub_cb_buf);
vfree(net_device->sub_cb_buf);
free_netvsc_device(net_device); free_netvsc_device(net_device);
return 0; return 0;
} }
......
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