* RE: [PATCH] infiniband:Fix error handling in the function cm_init_av_by_path
[not found] <1441655267-1462-1-git-send-email-xerofoify@gmail.com>
@ 2015-09-08 16:42 ` Hefty, Sean
0 siblings, 0 replies; only message in thread
From: Hefty, Sean @ 2015-09-08 16:42 UTC (permalink / raw)
To: Nicholas Krause, dledford
Cc: hal.rosenstock, Weiny, Ira, yun.wang, jgunthorpe, david.ahern,
erezsh, ted.h.kim, linux-rdma, linux-kernel
> 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-08 16:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1441655267-1462-1-git-send-email-xerofoify@gmail.com>
2015-09-08 16:42 ` [PATCH] infiniband:Fix error handling in the function cm_init_av_by_path Hefty, Sean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).