Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36e97a57 authored by Kumar Amit Mehta's avatar Kumar Amit Mehta Committed by Greg Kroah-Hartman
Browse files

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: default avatarKumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c17d37df
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3258,7 +3258,8 @@ static int __devinit rtl8180_pci_probe(struct pci_dev *pdev,


	netif_carrier_off(dev);
	netif_carrier_off(dev);


	register_netdev(dev);
	if (register_netdev(dev))
		goto fail1;


	rtl8180_proc_init_one(dev);
	rtl8180_proc_init_one(dev);