From: Dan Carpenter <error27@gmail.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>,
"Luis R. Rodriguez" <lrodriguez@atheros.com>,
Bob Copeland <me@bobcopeland.com>,
"John W. Linville" <linville@tuxdriver.com>,
Bruno Randolf <br1@einfach.org>,
linux-wireless@vger.kernel.org, ath5k-devel@lists.ath5k.org,
kernel-janitors@vger.kernel.org
Subject: [patch] ath5k: re-order one of the frees on unwind
Date: Sat, 21 Aug 2010 19:24:59 +0000 [thread overview]
Message-ID: <20100821192459.GG6674@bicker> (raw)
There was a small misordering here. In the original code, if we were to
go to err_free_ah then it wouldn't free the irq.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 373dcfe..2447507 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -700,10 +700,10 @@ ath5k_pci_probe(struct pci_dev *pdev,
return 0;
err_ah:
ath5k_hw_detach(sc->ah);
-err_irq:
- free_irq(pdev->irq, sc);
err_free_ah:
kfree(sc->ah);
+err_irq:
+ free_irq(pdev->irq, sc);
err_free:
ieee80211_free_hw(hw);
err_map:
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>,
"Luis R. Rodriguez" <lrodriguez@atheros.com>,
Bob Copeland <me@bobcopeland.com>,
"John W. Linville" <linville@tuxdriver.com>,
Bruno Randolf <br1@einfach.org>,
linux-wireless@vger.kernel.org, ath5k-devel@lists.ath5k.org,
kernel-janitors@vger.kernel.org
Subject: [patch] ath5k: re-order one of the frees on unwind
Date: Sat, 21 Aug 2010 21:24:59 +0200 [thread overview]
Message-ID: <20100821192459.GG6674@bicker> (raw)
There was a small misordering here. In the original code, if we were to
go to err_free_ah then it wouldn't free the irq.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 373dcfe..2447507 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -700,10 +700,10 @@ ath5k_pci_probe(struct pci_dev *pdev,
return 0;
err_ah:
ath5k_hw_detach(sc->ah);
-err_irq:
- free_irq(pdev->irq, sc);
err_free_ah:
kfree(sc->ah);
+err_irq:
+ free_irq(pdev->irq, sc);
err_free:
ieee80211_free_hw(hw);
err_map:
next reply other threads:[~2010-08-21 19:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-21 19:24 Dan Carpenter [this message]
2010-08-21 19:24 ` [patch] ath5k: re-order one of the frees on unwind Dan Carpenter
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=20100821192459.GG6674@bicker \
--to=error27@gmail.com \
--cc=ath5k-devel@lists.ath5k.org \
--cc=br1@einfach.org \
--cc=jirislaby@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
--cc=me@bobcopeland.com \
--cc=mickflemm@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.