]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: replace snprintf with scnprintf in hns3_dbg_cmd_read
authorChen Zhou <chenzhou10@huawei.com>
Mon, 20 Jan 2020 12:49:43 +0000 (20:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jan 2020 09:48:17 +0000 (10:48 +0100)
commit832049dc8c7cd5be184bc955ad637ae0caa9c166
tree607cf2d8871be593e4f8122170d708945ac3e72e
parent2adb879c5a1a2ed548867e2350b08f545787e95e
net: hns3: replace snprintf with scnprintf in hns3_dbg_cmd_read

The return value of snprintf may be greater than the size of
HNS3_DBG_READ_LEN, use scnprintf instead in hns3_dbg_cmd_read.

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c