]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rds: fixed wrong condition in case of error
authorDotan Barak <dotanb@dev.mellanox.co.il>
Sun, 24 Jun 2012 06:06:50 +0000 (09:06 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 23:41:36 +0000 (16:41 -0700)
Need to use IS_ERR and not compare with NULL

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: Bang Nguyen <bang.nguyen@oracle.com>
net/rds/iw.c

index bea934078825e0d66847744db9998d5f734b15ef..13f4c4bc9df7e6b06e9f9e2f5187014d24dc3d07 100644 (file)
@@ -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));