From: Fuyun Liang Date: Tue, 15 May 2018 18:20:10 +0000 (+0100) Subject: net: hns3: Change return value in hnae3_register_client X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0c698257c7befa8d1ec1b8d767758c3d73a2686a;p=linux.git net: hns3: Change return value in hnae3_register_client A client includes many client instance. Just like ae_algo, Initializing client instance failed does not represent registering client failed. The action of registering client just is adding client to the client list and the result always is true. This patch changes the return value of hnae3_register_client form a variable value to a fixed value, makes the function always return ok. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.c b/drivers/net/ethernet/hisilicon/hns3/hnae3.c index 3b1c3966b7d46..bd3c232234d78 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.c +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.c @@ -98,7 +98,7 @@ int hnae3_register_client(struct hnae3_client *client) exit: mutex_unlock(&hnae3_common_lock); - return ret; + return 0; } EXPORT_SYMBOL(hnae3_register_client);