From: Dan Carpenter <error27@gmail.com>
To: netdev@vger.kernel.org
Subject: [patch] nui.c error handling
Date: Wed, 8 Apr 2009 14:39:28 +0300 (EAT) [thread overview]
Message-ID: <alpine.DEB.2.00.0904081437400.32632@bicker> (raw)
platform_device_register_simple() returns ERR_PTR(), not NULL, if an error
occurs.
Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com>
--- orig/drivers/net/niu.c 2009-04-07 21:59:22.000000000 +0300
+++ devel/drivers/net/niu.c 2009-04-07 22:00:45.000000000 +0300
@@ -8757,7 +8757,7 @@
plat_dev = platform_device_register_simple("niu", niu_parent_index,
NULL, 0);
- if (!plat_dev)
+ if (IS_ERR(plat_dev))
return NULL;
for (i = 0; attr_name(niu_parent_attributes[i]); i++) {
next reply other threads:[~2009-04-08 11:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 11:39 Dan Carpenter [this message]
2009-04-08 22:44 ` [patch] nui.c error handling David Miller
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=alpine.DEB.2.00.0904081437400.32632@bicker \
--to=error27@gmail.com \
--cc=netdev@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