• Fuyun Liang's avatar
    net: hns3: Change return type of hnae3_register_ae_dev · 50fbc237
    Fuyun Liang authored
    If hclge.ko has not been inserted, the value of ret always is zero
    in hnae3_register_ae_dev. If hclge.ko has been inserted, the value
    of ret is zero or non zero. Different execution ways have different
    results. It is confusing.
    
    The ae_dev which is initialized failed can be reinitialized when we
    remove hclge.ko and insert it again. For the case initializing client
    instance, it is just like the case initializing ae_dev. The main function
    of hnae3_register_ae_dev is adding the ae_dev to ad_dev list. Because
    adding ae_dev is always ok, we does not need to return any in this
    function.
    
    This patch changes the return type of hnae3_register_ae_dev from int
    to void.
    Signed-off-by: default avatarFuyun Liang <liangfuyun1@huawei.com>
    Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
    Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    50fbc237
hnae3.c 7.58 KB