linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ath6kl: Fix missing release of semaphore in ath6kl_stop_txrx()
@ 2012-02-14 15:02 Vasanthakumar Thiagarajan
  2012-02-14 15:03 ` [PATCH 2/2] ath6kl: Remove bogus non-NULL pointer check Vasanthakumar Thiagarajan
  2012-02-27 17:26 ` [PATCH 1/2] ath6kl: Fix missing release of semaphore in ath6kl_stop_txrx() Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Vasanthakumar Thiagarajan @ 2012-02-14 15:02 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, ath6kl-devel

This fixes smatch warning "inconsistent returns sem:&ar->sem".

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/init.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 72f1b4f..6fed628 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -1733,5 +1733,7 @@ void ath6kl_stop_txrx(struct ath6kl *ar)
 	ath6kl_reset_device(ar, ar->target_type, true, true);
 
 	clear_bit(WLAN_ENABLED, &ar->flag);
+
+	up(&ar->sem);
 }
 EXPORT_SYMBOL(ath6kl_stop_txrx);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ath6kl: Remove bogus non-NULL pointer check
  2012-02-14 15:02 [PATCH 1/2] ath6kl: Fix missing release of semaphore in ath6kl_stop_txrx() Vasanthakumar Thiagarajan
@ 2012-02-14 15:03 ` Vasanthakumar Thiagarajan
  2012-02-27 17:26 ` [PATCH 1/2] ath6kl: Fix missing release of semaphore in ath6kl_stop_txrx() Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Vasanthakumar Thiagarajan @ 2012-02-14 15:03 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, ath6kl-devel

In ath6kl_cfg80211_add_key(), params is checked for non-NULL
but this pointer has been deferenced many times before this check. This
gives the following smatch warning. add_key() can never carry NULL as
params, remove this bogus check.

ath6kl_cfg80211_add_key(86) warn: variable dereferenced before check 'params'

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index a91f521..313787e 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1059,7 +1059,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
 
 	if (vif->nw_type == AP_NETWORK && !pairwise &&
 	    (key_type == TKIP_CRYPT || key_type == AES_CRYPT ||
-	     key_type == WAPI_CRYPT) && params) {
+	     key_type == WAPI_CRYPT)) {
 		ar->ap_mode_bkey.valid = true;
 		ar->ap_mode_bkey.key_index = key_index;
 		ar->ap_mode_bkey.key_type = key_type;
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ath6kl: Fix missing release of semaphore in ath6kl_stop_txrx()
  2012-02-14 15:02 [PATCH 1/2] ath6kl: Fix missing release of semaphore in ath6kl_stop_txrx() Vasanthakumar Thiagarajan
  2012-02-14 15:03 ` [PATCH 2/2] ath6kl: Remove bogus non-NULL pointer check Vasanthakumar Thiagarajan
@ 2012-02-27 17:26 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2012-02-27 17:26 UTC (permalink / raw)
  To: Vasanthakumar Thiagarajan; +Cc: linux-wireless, ath6kl-devel

On 02/14/2012 05:02 PM, Vasanthakumar Thiagarajan wrote:
> This fixes smatch warning "inconsistent returns sem:&ar->sem".
> 
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

Thanks, both patches applied.

Kalle

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-27 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 15:02 [PATCH 1/2] ath6kl: Fix missing release of semaphore in ath6kl_stop_txrx() Vasanthakumar Thiagarajan
2012-02-14 15:03 ` [PATCH 2/2] ath6kl: Remove bogus non-NULL pointer check Vasanthakumar Thiagarajan
2012-02-27 17:26 ` [PATCH 1/2] ath6kl: Fix missing release of semaphore in ath6kl_stop_txrx() Kalle Valo

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).