diff options
author | Kumar Amit Mehta <gmate.amit@gmail.com> | 2012-11-15 17:22:13 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-15 23:26:14 (GMT) |
commit | 4087641b255cb003ce653aac79e3445fcb864552 (patch) | |
tree | 007e6d903783e2f684ea4a8ccc0dea5b1b259279 /drivers/staging/rtl8192e | |
parent | dba2939c8d4128664ddfddc169b32ae4b39aebc1 (diff) | |
download | linux-4087641b255cb003ce653aac79e3445fcb864552.tar.xz |
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>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 81134d3..f68df24 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -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); |