diff options
author | Jian Shen <shenjian15@huawei.com> | 2018-09-21 16:41:42 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-21 19:29:32 -0700 |
commit | fa7a4bd564ccca06f17f5f509ab020ee973b4c72 (patch) | |
tree | 2d09ac32002b343c6e3e190a68e2fa5f0d89db77 /drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | |
parent | net: hns3: Unify the prefix of vf functions (diff) | |
download | linux-dev-fa7a4bd564ccca06f17f5f509ab020ee973b4c72.tar.xz linux-dev-fa7a4bd564ccca06f17f5f509ab020ee973b4c72.zip |
net: hns3: Add handle for default case
There are a few "switch-case" codes missed handle for default case. For
some abnormal case, it should return error code instead of return 0.
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 84129c58e6fa..b64418763b13 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -1667,6 +1667,9 @@ static int hclgevf_init_client_instance(struct hnae3_client *client, } hnae3_set_client_init_flag(client, ae_dev, 1); + break; + default: + return -EINVAL; } return 0; |