Skip to contentSkip to conversation

saquery.c: Return proper status from query_sa_cpi on bad result status

PATCH Applied Hal Rosenstock 2 participants 2 messages Nov 5, 2014 – Nov 8, 2014 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 saquery.c: Return proper status from query_sa_cpi on bad result status

When result status was other than IB_SA_MAD_STATUS_SUCCESS, 0 was being returned rather than EIO as intended.

---

src/saquery.c +1 -1
index 0f39064..1af3401 100644
@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 545A86ED.9060803-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org

Applied
#2 lore raw
Quoted 11 lines

-----Original Message-----
From: Hal Rosenstock [mailto:[email protected]]
Sent: Wednesday, November 05, 2014 12:22 PM
To: Weiny, Ira
Cc: linux-rdma ([email protected]); Dan Ben-Yosef
Subject: [PATCH infiniband-diags] saquery.c: Return proper status from query_sa_cpi on bad result status

Quoted 4 lines

When result status was other than IB_SA_MAD_STATUS_SUCCESS, 0 was being returned rather than EIO as intended.

Thanks applied,
Ira

Quoted 13 lines

---

src/saquery.c +1 -1
@@ -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;
 }
 
Quoted 1 line

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html