From: Andy Grover <andy.grover@oracle.com>
To: netdev@vger.kernel.org
Cc: rds-devel@oss.oracle.com, Dan Carpenter <error27@gmail.com>
Subject: [PATCH 11/12] ERR_PTR() dereference in net/rds/ib.c
Date: Thu, 9 Apr 2009 17:09:46 -0700 [thread overview]
Message-ID: <1239322187-3764-12-git-send-email-andy.grover@oracle.com> (raw)
In-Reply-To: <1239322187-3764-1-git-send-email-andy.grover@oracle.com>
From: Dan Carpenter <error27@gmail.com>
rdma_create_id() doesn't return NULL, only ERR_PTR().
Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andy Grover <andy.grover@oracle.com>
---
net/rds/ib.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/rds/ib.c b/net/rds/ib.c
index 4933b38..b9bcd32 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -224,8 +224,8 @@ static int rds_ib_laddr_check(__be32 addr)
* IB and iWARP capable NICs.
*/
cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);
- if (!cm_id)
- return -EADDRNOTAVAIL;
+ if (IS_ERR(cm_id))
+ return PTR_ERR(cm_id);
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
--
1.5.6.3
next prev parent reply other threads:[~2009-04-10 0:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 0:09 [PATCH net-next 0/12] RDS: updates for net-next Andy Grover
2009-04-10 0:09 ` [PATCH 01/12] RDS/IW+IB: Set recv ring low water mark to 1/2 full Andy Grover
2009-04-10 0:09 ` [PATCH 02/12] RDS: Correct some iw references in rdma_transport.c Andy Grover
2009-04-10 0:09 ` [PATCH 03/12] RDS/IW+IB: Set the RDS_LL_SEND_FULL bit when we're throttled Andy Grover
2009-04-10 0:09 ` [PATCH 04/12] RDS/IW+IB: Allow max credit advertise window Andy Grover
2009-04-10 0:09 ` [PATCH 05/12] RDS: Fix ordering in a conditional Andy Grover
2009-04-10 0:09 ` [PATCH 06/12] RDS: Establish connection before parsing CMSGs Andy Grover
2009-04-10 0:09 ` [PATCH 07/12] RDS: use get_user_pages_fast() Andy Grover
2009-04-10 0:09 ` [PATCH 08/12] RDS: remove unused #include <version.h> Andy Grover
2009-04-10 0:09 ` [PATCH 09/12] rds: use kmem_cache_zalloc instead of kmem_cache_alloc/memset Andy Grover
2009-04-10 0:09 ` [PATCH 10/12] ERR_PTR() dereference in net/rds/iw.c Andy Grover
2009-04-10 0:09 ` Andy Grover [this message]
2009-04-10 0:09 ` [PATCH 12/12] MAINTAINERS: rds list is moderated Andy Grover
2009-04-10 0:21 ` [PATCH net-next 0/12] RDS: updates for net-next 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=1239322187-3764-12-git-send-email-andy.grover@oracle.com \
--to=andy.grover@oracle.com \
--cc=error27@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).