]> err.no Git - linux-2.6/commitdiff
IB/cm: Fix error handling in ib_send_cm_req
authorSean Hefty <sean.hefty@intel.com>
Tue, 25 Jul 2006 16:52:01 +0000 (19:52 +0300)
committerRoland Dreier <rolandd@cisco.com>
Thu, 3 Aug 2006 16:44:22 +0000 (09:44 -0700)
Report error code rather than success (0) on failure allocating
timewait_info in ib_send_cm_req().

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/cm.c

index f85c97f7500a844d41bd5e7b5243e6cd10bd44db..0de335b7bfc2f9e5236f603cf765e3fd96d89fc1 100644 (file)
@@ -975,8 +975,10 @@ int ib_send_cm_req(struct ib_cm_id *cm_id,
 
        cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv->
                                                            id.local_id);
-       if (IS_ERR(cm_id_priv->timewait_info))
+       if (IS_ERR(cm_id_priv->timewait_info)) {
+               ret = PTR_ERR(cm_id_priv->timewait_info);
                goto out;
+       }
 
        ret = cm_init_av_by_path(param->primary_path, &cm_id_priv->av);
        if (ret)