Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>,
	Nick Kossifidis <mickflemm@gmail.com>,
	"Luis R. Rodriguez" <lrodriguez@atheros.com>,
	Bob Copeland <me@bobcopeland.com>,
	ath5k-devel@lists.ath5k.org,
	Alan Jenkins <sourcejedi.lkml@googlemail.com>
Subject: Re: [PATCH] ath5k: avoid leaking mutex in ath5k_config
Date: Mon, 25 May 2009 23:42:43 +0200	[thread overview]
Message-ID: <1243287763.29222.9.camel@johannes.local> (raw)
In-Reply-To: <1243280050-3755-1-git-send-email-linville@tuxdriver.com>

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

On Mon, 2009-05-25 at 21:34 +0200, John W. Linville wrote:
> Reported-by: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
> I lost track of the related bug report -- Johannes, do you recall?

Thanks for fixing -- the report is Alan's (CC'ed) at
http://article.gmane.org/gmane.linux.kernel.wireless.general/33449

johannes

>  drivers/net/wireless/ath/ath5k/base.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index fb51937..dd6dc8d 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -2779,7 +2779,7 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
>  
>  	ret = ath5k_chan_set(sc, conf->channel);
>  	if (ret < 0)
> -		return ret;
> +		goto unlock;
>  
>  	if ((changed & IEEE80211_CONF_CHANGE_POWER) &&
>  	(sc->power_level != conf->power_level)) {
> @@ -2808,8 +2808,9 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
>  	 */
>  	ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT);
>  
> +unlock:
>  	mutex_unlock(&sc->lock);
> -	return 0;
> +	return ret;
>  }
>  
>  #define SUPPORTED_FIF_FLAGS \

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2009-05-25 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25 19:34 [PATCH] ath5k: avoid leaking mutex in ath5k_config John W. Linville
2009-05-25 21:42 ` Johannes Berg [this message]
2009-05-27 12:38   ` Bob Copeland

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=1243287763.29222.9.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=me@bobcopeland.com \
    --cc=mickflemm@gmail.com \
    --cc=sourcejedi.lkml@googlemail.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