Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220987

RE: [PATCH] infiniband:Fix error handling in the function cm_init_av_by_path

From "Hefty, Sean" <sean.hefty@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH] infiniband:Fix error handling in the function cm_init_av_by_path
Date 2015-09-08 18:50 +0200
Message-ID <q6ufO-1tS-41@gated-at.bofh.it> (permalink)
References <q6ufO-1tS-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> This fixes error handling in the function cm_init_av_by_path
> to properly check if the internal call to the function
> ib_init_ah_from_path has failed by returning a error code and
> if so return immediately to the caller with this error code in
> order to signal/allow the caller to handle the error in its own
> intended error paths.
> 
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>

Acked-by: Sean Hefty <sean.hefty@intel.com>

> ---
>  drivers/infiniband/core/cm.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
> index 3a972eb..cb021fd 100644
> --- a/drivers/infiniband/core/cm.c
> +++ b/drivers/infiniband/core/cm.c
> @@ -379,8 +379,10 @@ static int cm_init_av_by_path(struct ib_sa_path_rec
> *path, struct cm_av *av)
>  		return ret;
> 
>  	av->port = port;
> -	ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path,
> -			     &av->ah_attr);
> +	ret = ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path,
> +				   &av->ah_attr);
> +	if (ret)
> +		return ret;
>  	av->timeout = path->packet_life_time + 1;
>  	memcpy(av->smac, path->smac, sizeof(av->smac));
> 
> --
> 2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

RE: [PATCH] infiniband:Fix error handling in the function  cm_init_av_by_path "Hefty, Sean" <sean.hefty@intel.com> - 2015-09-08 18:50 +0200

csiph-web