提交 24171a25 编写于 作者: Y Yonglong Liu 提交者: Yang Yingliang

net: hns3: remove redundant assignment to rx_index

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

----------------------------
Signed-off-by: NYonglong Liu <liuyonglong@huawei.com>
Reviewed-by: Nli yongxin <liyongxin1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 08a82788
...@@ -163,9 +163,7 @@ static int hns3_dbg_bd_info(struct hnae3_handle *h, const char *cmd_buf) ...@@ -163,9 +163,7 @@ static int hns3_dbg_bd_info(struct hnae3_handle *h, const char *cmd_buf)
int cnt; int cnt;
cnt = sscanf(&cmd_buf[8], "%u %u", &q_num, &tx_index); cnt = sscanf(&cmd_buf[8], "%u %u", &q_num, &tx_index);
if (cnt == 2) { if (cnt != 1 && cnt != 2) {
rx_index = tx_index;
} else if (cnt != 1) {
dev_err(dev, "bd info: bad command string, cnt=%d\n", cnt); dev_err(dev, "bd info: bad command string, cnt=%d\n", cnt);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册