Commit 62c0743e authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: netvsc: Cleanup error codes in rndis_filter_receive()

Use standard Linux error codes.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ace163a8
...@@ -358,14 +358,14 @@ int rndis_filter_receive(struct hv_device *dev, ...@@ -358,14 +358,14 @@ int rndis_filter_receive(struct hv_device *dev,
if (!net_dev->extension) { if (!net_dev->extension) {
dev_err(&dev->device, "got rndis message but no rndis device - " dev_err(&dev->device, "got rndis message but no rndis device - "
"dropping this message!\n"); "dropping this message!\n");
return -1; return -ENODEV;
} }
rndis_dev = (struct rndis_device *)net_dev->extension; rndis_dev = (struct rndis_device *)net_dev->extension;
if (rndis_dev->state == RNDIS_DEV_UNINITIALIZED) { if (rndis_dev->state == RNDIS_DEV_UNINITIALIZED) {
dev_err(&dev->device, "got rndis message but rndis device " dev_err(&dev->device, "got rndis message but rndis device "
"uninitialized...dropping this message!\n"); "uninitialized...dropping this message!\n");
return -1; return -ENODEV;
} }
rndis_hdr = (struct rndis_message *)kmap_atomic( rndis_hdr = (struct rndis_message *)kmap_atomic(
......
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