From: Guangbin Huang huangguangbin2@huawei.com
driver inclusion category: cleanup bugzilla: NA CVE: NA
This patch renames the variable flag into existed, as the meaning of existed is clearer.
Signed-off-by: Guangbin Huang huangguangbin2@huawei.com Reviewed-by: Peng Li lipeng321@huawei.com Reviewed-by: Zhong Zhaohui zhongzhaohui@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hnae3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.c b/drivers/net/ethernet/hisilicon/hns3/hnae3.c index bbc14b6..4afa509 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.c +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.c @@ -140,7 +140,7 @@ void hnae3_unregister_client(struct hnae3_client *client) { struct hnae3_client *client_tmp; struct hnae3_ae_dev *ae_dev; - bool flag = false; + bool existed = false;
if (!client) return; @@ -149,12 +149,12 @@ void hnae3_unregister_client(struct hnae3_client *client) /* one system should only have one client for every type */ list_for_each_entry(client_tmp, &hnae3_client_list, node) { if (client_tmp->type == client->type) { - flag = true; + existed = true; break; } }
- if (!flag) { + if (!existed) { mutex_unlock(&hnae3_common_lock); return; }