netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <weiyang@linux.vnet.ibm.com>
To: Wei Yang <weiyang@linux.vnet.ibm.com>
Cc: dm@chelsio.com, netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] cxgb4: remove workqueue when driver registration fails
Date: Sun, 15 Sep 2013 21:58:19 +0800	[thread overview]
Message-ID: <20130915135819.GA10479@weiyang.vnet.ibm.com> (raw)
In-Reply-To: <1379253180-10292-1-git-send-email-weiyang@linux.vnet.ibm.com>

This time, I cc-ed to myself. And this applies to the latest net tree.

It looks not corrupted to me. Not sure other people can see it clearly? 

On Sun, Sep 15, 2013 at 09:53:00PM +0800, Wei Yang wrote:
>When driver registration fails, we need to clean up the resources allocated
>before. cxgb4 missed to destroy the workqueue allocated at the very beginning.
>
>This patch destroies the workqueue when registration fails.
>
>Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
>---
> drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c |    4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
>index 0d0665c..c73cabd 100644
>--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
>+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
>@@ -6149,8 +6149,10 @@ static int __init cxgb4_init_module(void)
> 		pr_warn("could not create debugfs entry, continuing\n");
>
> 	ret = pci_register_driver(&cxgb4_driver);
>-	if (ret < 0)
>+	if (ret < 0) {
> 		debugfs_remove(cxgb4_debugfs_root);
>+		destroy_workqueue(workq);
>+	}
>
> 	register_inet6addr_notifier(&cxgb4_inet6addr_notifier);
>
>-- 
>1.7.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Richard Yang
Help you, Help me

  reply	other threads:[~2013-09-15 13:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-15 13:53 [PATCH] cxgb4: remove workqueue when driver registration fails Wei Yang
2013-09-15 13:58 ` Wei Yang [this message]
2013-09-16  4:53 ` David Miller
2013-09-16  5:28   ` Wei Yang
  -- strict thread matches above, loose matches on Subject: below --
2013-09-06  1:32 Wei Yang
2013-09-11 19:52 ` David Miller
2013-09-15 12:24   ` Wei Yang

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=20130915135819.GA10479@weiyang.vnet.ibm.com \
    --to=weiyang@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=dm@chelsio.com \
    --cc=netdev@vger.kernel.org \
    /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).