Skip to content

Commit

Permalink
staging: rtl8192e: rtl8192e: rtl_core.c: Audit the return value of re…
Browse files Browse the repository at this point in the history
…gister_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>
  • Loading branch information
Kumar Amit Mehta authored and Greg Kroah-Hartman committed Nov 15, 2012
1 parent dba2939 commit 4087641
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/rtl8192e/rtl8192e/rtl_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4087641

Please sign in to comment.