Staging: hv: netvsc: Cleanup error codes in rndis_filter_receive()
authorK. Y. Srinivasan <kys@microsoft.com>
Thu, 25 Aug 2011 16:49:17 +0000 (09:49 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 25 Aug 2011 22:32:11 +0000 (15:32 -0700)
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>
drivers/staging/hv/rndis_filter.c

index dbb520199756b2ef294be80d4c8376c990c0bd34..8e1ef0056d6b696419843be59642f025d5819007 100644 (file)
@@ -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(