netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Remove redundant assertion
@ 2019-12-15 15:23 Aditya Pakki
  0 siblings, 0 replies; only message in thread
From: Aditya Pakki @ 2019-12-15 15:23 UTC (permalink / raw)
  To: pakki001
  Cc: kjlu, Johannes Berg, David S. Miller, linux-wireless, netdev,
	linux-kernel

In wiphy_to_ieee80211_hw, the assertion to check if wiphy is NULL is
repeated in wiphy_priv. The patch removes the duplicated BUG_ON check.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
 net/mac80211/util.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 32a7a53833c0..780df3e9092e 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -39,7 +39,6 @@ const void *const mac80211_wiphy_privid = &mac80211_wiphy_privid;
 struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy)
 {
 	struct ieee80211_local *local;
-	BUG_ON(!wiphy);
 
 	local = wiphy_priv(wiphy);
 	return &local->hw;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-15 15:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-15 15:23 [PATCH] mac80211: Remove redundant assertion Aditya Pakki

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