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 <h...@mellanox.com>
---
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to