Message ID | 20211220112133.472472-1-deng.changcheng@zte.com.cn |
---|---|
State | New |
Headers | show |
Series | ath11k: use min() to make code cleaner | expand |
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index 2b4d27d807ab..083856034136 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -614,8 +614,7 @@ int ath11k_wmi_mgmt_send(struct ath11k *ar, u32 vdev_id, u32 buf_id, u32 buf_len; int ret, len; - buf_len = frame->len < WMI_MGMT_SEND_DOWNLD_LEN ? - frame->len : WMI_MGMT_SEND_DOWNLD_LEN; + buf_len = min(frame->len, WMI_MGMT_SEND_DOWNLD_LEN); len = sizeof(*cmd) + sizeof(*frame_tlv) + roundup(buf_len, 4);