Skip to contentSkip to conversation

RDMA/hfi1: Remove the unneeded result variable

PATCH Applied [email protected] 2 participants 2 messages Sep 1, 2022 – Sep 5, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/hfi1: Remove the unneeded result variable

From: ye xingchen <[email protected]>

Return the value set_link_state() directly instead of storing it in another redundant variable.

---
 drivers/infiniband/hw/hfi1/verbs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/infiniband/hw/hfi1/verbs.c +1 -3
index ec4f316a28e1..e6e17984553c 100644
@@ -1447,12 +1447,10 @@ static int shut_down_port(struct rvt_dev_info *rdi, u32 port_num)
 	struct hfi1_ibdev *verbs_dev = dev_from_rdi(rdi);
 	struct hfi1_devdata *dd = dd_from_dev(verbs_dev);
 	struct hfi1_pportdata *ppd = &dd->pport[port_num - 1];
-	int ret;
 
 	set_link_down_reason(ppd, OPA_LINKDOWN_REASON_UNKNOWN, 0,
 			     OPA_LINKDOWN_REASON_UNKNOWN);
-	ret = set_link_state(ppd, HLS_DN_DOWNDEF);
-	return ret;
+	return set_link_state(ppd, HLS_DN_DOWNDEF);
 }
 
 static int hfi1_get_guid_be(struct rvt_dev_info *rdi, struct rvt_ibport *rvp,
Signature · 1 line
2.25.1