* [PATCH] staging: rtl8187se: r8180_core.c: Inspect the return value of register_netdev()
@ 2012-11-14 10:12 ` Kumar Amit Mehta
0 siblings, 0 replies; 2+ messages in thread
From: Kumar Amit Mehta @ 2012-11-14 10:00 UTC (permalink / raw)
To: gregkh; +Cc: amiller, akpm, joe, devel, linux-kernel, kernel-janitors
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>
---
drivers/staging/rtl8187se/r8180_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 20e5fb5..833b083 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -3638,7 +3638,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);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] staging: rtl8187se: r8180_core.c: Inspect the return value of register_netdev()
@ 2012-11-14 10:12 ` Kumar Amit Mehta
0 siblings, 0 replies; 2+ messages in thread
From: Kumar Amit Mehta @ 2012-11-14 10:12 UTC (permalink / raw)
To: gregkh; +Cc: amiller, akpm, joe, devel, linux-kernel, kernel-janitors
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>
---
drivers/staging/rtl8187se/r8180_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 20e5fb5..833b083 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -3638,7 +3638,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);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-14 11:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14 10:00 [PATCH] staging: rtl8187se: r8180_core.c: Inspect the return value of register_netdev() Kumar Amit Mehta
2012-11-14 10:12 ` Kumar Amit Mehta
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.