From: Changcheng Deng <deng.changcheng@xxxxxxxxxx> Use min() in order to make code cleaner. Reported-by: Zeal Robot <zealci@xxxxxxxxxx> Signed-off-by: Changcheng Deng <deng.changcheng@xxxxxxxxxx> --- drivers/net/wireless/ath/ath11k/wmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.25.1