Commit 4e0b6612 authored by Yonglong Liu's avatar Yonglong Liu Committed by Jiantao Xiao
Browse files

net: hns3: unsigned value not need to judge to be less than 0

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


CVE: NA

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

Fixes: c64545e1 ("net: hns3: add support for Hisilicon ptp sync device")
Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
parent 474c3b02
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -756,7 +756,7 @@ static ssize_t hisi_ptp_dbg_read_state(struct file *filp, char __user *buf,

	if (*ppos < 0)
		return -EINVAL;
	if (cnt <= 0)
	if (cnt == 0)
		return 0;
	if (!access_ok(buf, cnt))
		return -EFAULT;
@@ -914,7 +914,7 @@ static ssize_t hisi_ptp_dbg_read_reg(struct file *filp, char __user *buf,

	if (*ppos < 0)
		return -EINVAL;
	if (cnt <= 0)
	if (cnt == 0)
		return 0;
	if (!access_ok(buf, cnt))
		return -EFAULT;