Commit 602a824f authored by Peiyang Wang's avatar Peiyang Wang Committed by chenyi
Browse files

net: hns3: don't need to check an unsigned number is less than 0

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9QYBA


CVE: NA

----------------------------------------------------------------------

It is not necessary to check whether an unsigned number is less than 0.

Fixes: 2651bcce ("net: hns3: add supports pfc storm detection and suppression")

Signed-off-by: default avatarPeiyang Wang <wangpeiyang1@huawei.com>
Signed-off-by: default avatarchenyi <chenyi211@huawei.com>
parent 763e390b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ static int nic_check_pfc_storm_para(int dir, int enable, int period_ms,
	    period_ms > HNS3_PFC_STORM_PARA_PERIOD_MAX ||
	    recovery_period_ms < HNS3_PFC_STORM_PARA_PERIOD_MIN ||
	    recovery_period_ms > HNS3_PFC_STORM_PARA_PERIOD_MAX ||
	    times <= 0)
	    !times)
		return -EINVAL;

	return 0;