From: Sean Hefty Date: Tue, 25 Jul 2006 16:52:01 +0000 (+0300) Subject: IB/cm: Fix error handling in ib_send_cm_req X-Git-Tag: v2.6.18-rc4~54 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75df23e229acab85b704f4603bdf5efdc7960e6a;p=linux-2.6 IB/cm: Fix error handling in ib_send_cm_req Report error code rather than success (0) on failure allocating timewait_info in ib_send_cm_req(). Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index f85c97f750..0de335b7bf 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -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)