From: Markus Elfring <Markus.Elfring@web.de>
To: Huazhong Tan <tanhuazhong@huawei.com>, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linuxarm@huawei.com,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Salil Mehta <salil.mehta@huawei.com>,
Yisen Zhuang <yisen.zhuang@huawei.com>
Subject: Re: [PATCH 02/12] net: hns3: Destroy a mutex after initialisation failure in hclge_init_ad_dev()
Date: Thu, 28 May 2020 20:42:25 +0200 [thread overview]
Message-ID: <913bb77c-6190-9ce7-a46d-906998866073@web.de> (raw)
> Add a mutex destroy call in hclge_init_ae_dev() when fails.
How do you think about a wording variant like the following?
Change description:
The function “mutex_init” was called before a call of
the function “hclge_pci_init”.
But the function “mutex_destroy” was not called after initialisation
steps failed.
Thus add the missed function call for the completion of
the exception handling.
Would you like to add the tag “Fixes” to the commit message?
…
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> @@ -10108,6 +10108,7 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
> pci_release_regions(pdev);
> pci_disable_device(pdev);
> out:
> + mutex_destroy(&hdev->vport_lock);
> return ret;
> }
How do you think about to use the label “destroy_mutex” instead?
Regards,
Markus
next reply other threads:[~2020-05-28 18:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 18:42 Markus Elfring [this message]
2020-05-29 1:56 ` [PATCH 02/12] net: hns3: Destroy a mutex after initialisation failure in hclge_init_ad_dev() tanhuazhong
2020-05-29 5:04 ` [02/12] net: hns3: Destroy a mutex after initialisation failure in hclge_init_ae_dev() Markus Elfring
2020-05-29 9:00 ` Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=913bb77c-6190-9ce7-a46d-906998866073@web.de \
--to=markus.elfring@web.de \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=tanhuazhong@huawei.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).