mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
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:
parent
3fedeab10b
commit
aa99c47933
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user