提交 bd4578bc 编写于 作者: F Fabian Frederick 提交者: 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: NFabian Frederick <fabf@skynet.be>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 179d80af
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册