On Thu, 14 Mar 2013 at 03:41 GMT, Zhouyi Zhou <[email protected]> wrote:
> Tested on my x86_64 machine
>
> Signed-off-by: Zhouyi Zhou <[email protected]>
> ---
>  drivers/infiniband/hw/cxgb4/cm.c |   12 ++++++++++++
>  include/net/dst.h                |    6 ++++--
>  2 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/cxgb4/cm.c 
> b/drivers/infiniband/hw/cxgb4/cm.c
> index 565bfb1..6b95851 100644
> --- a/drivers/infiniband/hw/cxgb4/cm.c
> +++ b/drivers/infiniband/hw/cxgb4/cm.c
> @@ -1575,6 +1575,12 @@ static int c4iw_reconnect(struct c4iw_ep *ep)
>  
>       neigh = dst_neigh_lookup(ep->dst,
>                       &ep->com.cm_id->remote_addr.sin_addr.s_addr);
> +     if (!neigh) {
> +             pr_err("%s - cannot alloc neigh.\n", __func__);
> +             err = -ENOMEM;
> +             goto fail4;


You don't need to print error messages for OOM, the mm subsystem will
do.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to