Some simple if-else logic can be simplified using the ! operator to improve code readability. Signed-off-by: Liao Yuanhong --- drivers/net/wireless/ath/ath11k/mac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 1fadf5faafb8..328df27116ce 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -7936,10 +7936,8 @@ static void ath11k_mac_parse_tx_pwr_env(struct ath11k *ar, "no transmit power envelope match client power type %d\n", client_type); return; - } else if (!reg_tpe_count) { - use_local_tpe = true; } else { - use_local_tpe = false; + use_local_tpe = !reg_tpe_count; } if (use_local_tpe) { -- 2.34.1