diff options
author | Jie Wang <[email protected]> | 2022-04-24 20:57:23 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2022-04-25 10:48:49 +0100 |
commit | 48009e9972974c52a5f649f761862dd67bce3d13 (patch) | |
tree | 7450c17a3fe032bd08dbce5c64b0eaf033553559 /lib/pm-notifier-error-inject.c | |
parent | 123521b6b260d901937d3fb598ab88d260c857a6 (diff) |
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 <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions