* [PATCH] staging: rtl8192e: rtl8192e: rtl_core.c: Audit the return value of register_netdev()
@ 2012-11-15 17:22 Kumar Amit Mehta
0 siblings, 0 replies; only message in thread
From: Kumar Amit Mehta @ 2012-11-15 17:22 UTC (permalink / raw)
To: gregkh; +Cc: seanm, s.l-h, tim.gardner, 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/rtl8192e/rtl8192e/rtl_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 81134d3..f68df24 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -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);
--
1.7.9.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-15 17:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 17:22 [PATCH] staging: rtl8192e: rtl8192e: rtl_core.c: Audit the return value of register_netdev() Kumar Amit Mehta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®