diff options
author | Kumar Amit Mehta <gmate.amit@gmail.com> | 2012-11-14 10:00:57 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-15 00:34:58 (GMT) |
commit | 36e97a5714073a1f95c70cbb925928ca7315fb66 (patch) | |
tree | 08c8a5b83fe3def754a7584539fc1b8b27e68a65 /drivers/staging/rtl8187se/r8180_core.c | |
parent | c17d37df984b0eaf67d422b2698755fe71d6d1e0 (diff) | |
download | linux-fsl-qoriq-36e97a5714073a1f95c70cbb925928ca7315fb66.tar.xz |
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>
Diffstat (limited to 'drivers/staging/rtl8187se/r8180_core.c')
-rw-r--r-- | drivers/staging/rtl8187se/r8180_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index ea04eec..6a27836 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -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); |