drivers/net: replace BUG() with BUG_ON() if possible
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / net / wireless / ath5k / reset.c
index 7a17d31b2fd9f762a2bd8870639e7e0ed8b3723c..cb5e15f97095f654a4ece6d23741ee4abb4daee8 100644 (file)
@@ -54,9 +54,8 @@ static inline int ath5k_hw_write_ofdm_timings(struct ath5k_hw *ah,
        u32 coef_scaled, coef_exp, coef_man,
                ds_coef_exp, ds_coef_man, clock;
 
-       if (!(ah->ah_version == AR5K_AR5212) ||
-               !(channel->hw_value & CHANNEL_OFDM))
-               BUG();
+       BUG_ON(!(ah->ah_version == AR5K_AR5212) ||
+               !(channel->hw_value & CHANNEL_OFDM));
 
        /* Get coefficient
         * ALGO: coef = (5 * clock * carrier_freq) / 2)