All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] mac80211: remove unneeded check
@ 2011-02-07 19:03 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-02-07 19:03 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John W. Linville, linux-wireless, kernel-janitors

"ap" is the address of sdata->u.ap so it can never be NULL here.  Also
we dereferenced it on the previous line.  I removed the check.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f305835..ce01bee 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2242,7 +2242,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
 	if (sdata->vif.type == NL80211_IFTYPE_AP) {
 		ap = &sdata->u.ap;
 		beacon = rcu_dereference(ap->beacon);
-		if (ap && beacon) {
+		if (beacon) {
 			/*
 			 * headroom, head length,
 			 * tail length and maximum TIM length

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

* [patch] mac80211: remove unneeded check
@ 2011-02-07 19:03 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-02-07 19:03 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John W. Linville, linux-wireless, kernel-janitors

"ap" is the address of sdata->u.ap so it can never be NULL here.  Also
we dereferenced it on the previous line.  I removed the check.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f305835..ce01bee 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2242,7 +2242,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
 	if (sdata->vif.type = NL80211_IFTYPE_AP) {
 		ap = &sdata->u.ap;
 		beacon = rcu_dereference(ap->beacon);
-		if (ap && beacon) {
+		if (beacon) {
 			/*
 			 * headroom, head length,
 			 * tail length and maximum TIM length

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

end of thread, other threads:[~2011-02-07 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-07 19:03 [patch] mac80211: remove unneeded check Dan Carpenter
2011-02-07 19:03 ` Dan Carpenter

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.