From 6b010b6c77098bbbf68e34f2329abc91b8f313a4 Mon Sep 17 00:00:00 2001 From: Dotan Barak Date: Sun, 24 Jun 2012 09:06:50 +0300 Subject: [PATCH] rds: fixed wrong condition in case of error Need to use IS_ERR and not compare with NULL Signed-off-by: Dotan Barak Reviewed-by: Bang Nguyen --- net/rds/iw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/iw.c b/net/rds/iw.c index bea934078825..13f4c4bc9df7 100644 --- a/net/rds/iw.c +++ b/net/rds/iw.c @@ -226,7 +226,7 @@ static int rds_iw_laddr_check(__be32 addr) * IB and iWARP capable NICs. */ cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP); - if (!cm_id) + if (IS_ERR(cm_id)) return -EADDRNOTAVAIL; memset(&sin, 0, sizeof(sin)); -- 2.50.1