dect
/
linux-2.6
Archived
13
0
Fork 0

staging: rtl8192e: rtl8192e: rtl_core.c: Audit the return value of register_netdev()

Inspect the return value of register_netdev() in the driver probe routine and
return -ENODEV in case of error.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Kumar Amit Mehta 2012-11-15 22:52:13 +05:30 committed by Greg Kroah-Hartman
parent dba2939c8d
commit 4087641b25
1 changed files with 2 additions and 1 deletions

View File

@ -2955,7 +2955,8 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
netif_carrier_off(dev);
netif_stop_queue(dev);
register_netdev(dev);
if (register_netdev(dev))
goto err_free_irq;
RT_TRACE(COMP_INIT, "dev name: %s\n", dev->name);
rtl8192_proc_init_one(dev);