From: Kumar Amit Mehta <gmate.amit@gmail.com>
To: gregkh@linuxfoundation.org
Cc: amiller@amilx.com, akpm@linux-foundation.org, joe@perches.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] staging: rtl8187se: r8180_core.c: Inspect the return value of register_netdev()
Date: Wed, 14 Nov 2012 15:30:57 +0530 [thread overview]
Message-ID: <1352887257-23142-1-git-send-email-gmate.amit@gmail.com> (raw)
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
reply other threads:[~2012-11-14 11:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352887257-23142-1-git-send-email-gmate.amit@gmail.com \
--to=gmate.amit@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=amiller@amilx.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome