Skip to content

Commit

Permalink
drivers/net/hyperv/netvsc.c: remove unnecessary null test before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and David S. Miller committed Jul 3, 2014
1 parent 179d80a commit bd4578b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/hyperv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,9 +1094,7 @@ int netvsc_device_add(struct hv_device *device, void *additional_info)
vmbus_close(device->channel);

cleanup:

if (net_device)
kfree(net_device);
kfree(net_device);

return ret;
}

0 comments on commit bd4578b

Please sign in to comment.