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: MMI-PSA29.97-13-9~47927 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=75df23e229acab85b704f4603bdf5efdc7960e6a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 f85c97f7500a..0de335b7bfc2 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)