diff options
author | Jie Wang <wangjie125@huawei.com> | 2022-04-24 20:57:23 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-25 10:48:49 +0100 |
commit | 48009e9972974c52a5f649f761862dd67bce3d13 (patch) | |
tree | 7450c17a3fe032bd08dbce5c64b0eaf033553559 /drivers/fpga | |
parent | 123521b6b260d901937d3fb598ab88d260c857a6 (diff) | |
download | linux-48009e9972974c52a5f649f761862dd67bce3d13.tar.bz2 |
net: hns3: modify the return code of hclge_get_ring_chain_from_mbx
Currently, function hclge_get_ring_chain_from_mbx will return -ENOMEM if
ring_num is bigger than HCLGE_MBX_MAX_RING_CHAIN_PARAM_NUM. It is better to
return -EINVAL for the invalid parameter case.
So this patch fixes it by return -EINVAL in this abnormal branch.
Fixes: 5d02a58dae60 ("net: hns3: fix for buffer overflow smatch warning")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/fpga')
0 files changed, 0 insertions, 0 deletions