staging: rtl8187se: r8180_core.c: Inspect 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-14 15:30:57 +05:30 committed by Greg Kroah-Hartman
parent c17d37df98
commit 36e97a5714
1 changed files with 2 additions and 1 deletions

View File

@ -3258,7 +3258,8 @@ static int __devinit rtl8180_pci_probe(struct pci_dev *pdev,
netif_carrier_off(dev);
register_netdev(dev);
if (register_netdev(dev))
goto fail1;
rtl8180_proc_init_one(dev);