Skip to content

Commit

Permalink
IB/cm: Fix error handling in ib_send_cm_req
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sean Hefty authored and Roland Dreier committed Aug 3, 2006
1 parent 69e9fbb commit 75df23e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 75df23e

Please sign in to comment.