Commit 715a4801 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: netvsc: Fix a dereferencing issue

net_dev is being de-referenced without proper checking; fix it.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 92ae4ebd
......@@ -368,11 +368,11 @@ int rndis_filter_receive(struct hv_device *dev,
struct rndis_message *rndis_hdr;
struct net_device *ndev;
ndev = net_dev->ndev;
if (!net_dev)
return -EINVAL;
ndev = net_dev->ndev;
/* Make sure the rndis device state is initialized */
if (!net_dev->extension) {
netdev_err(ndev, "got rndis message but no rndis device - "
......
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