From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hal Rosenstock Subject: [PATCH infiniband-diags] saquery.c: Return proper status from query_sa_cpi on bad result status Date: Wed, 05 Nov 2014 15:22:05 -0500 Message-ID: <545A86ED.9060803@dev.mellanox.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ira Weiny Cc: "linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)" , Dan Ben-Yosef List-Id: linux-rdma@vger.kernel.org When result status was other than IB_SA_MAD_STATUS_SUCCESS, 0 was being returned rather than EIO as intended. Signed-off-by: Hal Rosenstock --- diff --git a/src/saquery.c b/src/saquery.c index 0f39064..1af3401 100644 --- a/src/saquery.c +++ b/src/saquery.c @@ -1445,7 +1445,7 @@ static int query_sa_cpi(struct sa_handle *h, struct query_params *query_params) memcpy(&query_params->cpi, cpi, sizeof(query_params->cpi)); Exit: sa_free_result_mad(&result); - return (0); + return ret; } static const struct query_cmd query_cmds[] = { -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html