From: Dotan Barak Date: Sun, 24 Jun 2012 06:06:50 +0000 (+0300) Subject: rds: fixed wrong condition in case of error X-Git-Tag: v4.1.12-92~319^2^2~2^2~20 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6b010b6c77098bbbf68e34f2329abc91b8f313a4;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/net/rds/iw.c b/net/rds/iw.c index bea934078825e..13f4c4bc9df7e 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));