aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-09-01 07:42:09 +0000
committerLeon Romanovsky <leon@kernel.org>2022-09-05 15:14:31 +0300
commite58f889e293e6bd13ae2b48208a4d0d15592bf5a (patch)
tree3d0f7cf45c319c2e3483c36ad34f067315f5c64b /drivers/infiniband/hw
parentMerge branch 'mlx5-next' into wip/leon-for-next (diff)
downloadlinux-dev-e58f889e293e6bd13ae2b48208a4d0d15592bf5a.tar.xz
linux-dev-e58f889e293e6bd13ae2b48208a4d0d15592bf5a.zip
RDMA/hfi1: Remove the unneeded result variable
Return the value set_link_state() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/20220901074209.313004-1-ye.xingchen@zte.com.cn Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/hfi1/verbs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c
index ec4f316a28e1..e6e17984553c 100644
--- a/drivers/infiniband/hw/hfi1/verbs.c
+++ b/drivers/infiniband/hw/hfi1/verbs.c
@@ -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,