Skip to content

Commit

Permalink
Staging: hv: netvsc: Cleanup error codes in rndis_filter_receive()
Browse files Browse the repository at this point in the history
Use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Aug 25, 2011
1 parent ace163a commit 62c0743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/hv/rndis_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,14 @@ int rndis_filter_receive(struct hv_device *dev,
if (!net_dev->extension) {
dev_err(&dev->device, "got rndis message but no rndis device - "
"dropping this message!\n");
return -1;
return -ENODEV;
}

rndis_dev = (struct rndis_device *)net_dev->extension;
if (rndis_dev->state == RNDIS_DEV_UNINITIALIZED) {
dev_err(&dev->device, "got rndis message but rndis device "
"uninitialized...dropping this message!\n");
return -1;
return -ENODEV;
}

rndis_hdr = (struct rndis_message *)kmap_atomic(
Expand Down

0 comments on commit 62c0743

Please sign in to comment.