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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Markus Elfring 2014-11-25 22:33:45 +01:00 committed by David S. Miller
parent 3fedeab10b
commit aa99c47933

View File

@ -561,9 +561,7 @@ int netvsc_device_remove(struct hv_device *device)
vmbus_close(device->channel);
/* 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);
return 0;
}