Commit a2205b33 authored by Peiyang Wang's avatar Peiyang Wang Committed by Hao Chen
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/I9NZTZ


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>
parent c2ab7cfe
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(u32 dir, u32 enable, u32 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;