Commit 4087641b authored by Kumar Amit Mehta's avatar Kumar Amit Mehta Committed by Greg Kroah-Hartman

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: default avatarKumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dba2939c
......@@ -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);
......
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