[PATCH net-next] net: hinic: simplify the return hinic_configure_max_qnum()

From: Zheng Yongjun
Date: Wed Dec 09 2020 - 04:23:10 EST


Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@xxxxxxxxxx>
---
drivers/net/ethernet/huawei/hinic/hinic_main.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index 350225bbe0be..9a9b09401d01 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -313,13 +313,7 @@ static void free_rxqs(struct hinic_dev *nic_dev)

static int hinic_configure_max_qnum(struct hinic_dev *nic_dev)
{
- int err;
-
- err = hinic_set_max_qnum(nic_dev, nic_dev->hwdev->nic_cap.max_qps);
- if (err)
- return err;
-
- return 0;
+ return hinic_set_max_qnum(nic_dev, nic_dev->hwdev->nic_cap.max_qps);
}

static int hinic_rss_init(struct hinic_dev *nic_dev)
--
2.22.0