From: Johannes Berg Date: Tue, 26 Mar 2013 21:10:02 +0000 (+0100) Subject: mac80211: replace some dead code by a warning X-Git-Tag: v3.10-rc2~34^2~21^2^2~117^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a23108248a9d41400e686becddb5584b3a3fec1e;p=platform%2Fkernel%2Flinux-exynos.git mac80211: replace some dead code by a warning Given the (nested) switch statements, this code can't be reached, so make it warn instead of manipulating the carrier state which seems purposeful. Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 8c94195..63b6367 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -581,7 +581,8 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up) case NL80211_IFTYPE_P2P_DEVICE: break; default: - netif_carrier_on(dev); + /* not reached */ + WARN_ON(1); } /*