staging: vt6655: return ENOMEM rather than ENODEV when alloc_etherdev fail
authorDevendra Naga <devendra.aaru@gmail.com>
Thu, 6 Sep 2012 18:38:05 +0000 (00:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Sep 2012 05:07:37 +0000 (22:07 -0700)
when alloc_etherdev fails we should be returning ENOMEM, not ENODEV

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/device_main.c

index 493866acd92c19987a475e0317261656349e8263..4ee5f38bb2bfbe3c326b687b088e0c5ef8613205 100644 (file)
@@ -922,7 +922,7 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
 
     if (dev == NULL) {
         printk(KERN_ERR DEVICE_NAME ": allocate net device failed \n");
-        return -ENODEV;
+        return -ENOMEM;
     }
 
     // Chain it all together