mwl8k: hw is never NULL in mwl8k_set_radio_preamble()
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 30 Nov 2009 17:31:40 +0000 (18:31 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 28 Dec 2009 21:31:24 +0000 (16:31 -0500)
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c

index b543defdde8a49abe9b2fe102d4643ce28b4f09a..aba45ca43da7fcb2af99dce025098d6dea3d2079 100644 (file)
@@ -1990,11 +1990,7 @@ static int mwl8k_cmd_radio_enable(struct ieee80211_hw *hw)
 static int
 mwl8k_set_radio_preamble(struct ieee80211_hw *hw, bool short_preamble)
 {
-       struct mwl8k_priv *priv;
-
-       if (hw == NULL || hw->priv == NULL)
-               return -EINVAL;
-       priv = hw->priv;
+       struct mwl8k_priv *priv = hw->priv;
 
        priv->radio_short_preamble = short_preamble;