diff --git a/drivers/soc/qcom/wcnss/wcnss_wlan.c b/drivers/soc/qcom/wcnss/wcnss_wlan.c index fba3dc744061..c77b248c6b76 100644 --- a/drivers/soc/qcom/wcnss/wcnss_wlan.c +++ b/drivers/soc/qcom/wcnss/wcnss_wlan.c @@ -2292,8 +2292,8 @@ static void wcnss_process_smd_msg(void *buf, int len) break; case WCNSS_BUILD_VER_RSP: - /* ToDo: WCNSS_MAX_BUILD_VER_LEN + sizeof(struct smd_msg_hdr) */ - if (len > WCNSS_MAX_BUILD_VER_LEN) { + if (len > sizeof(struct smd_msg_hdr) + + WCNSS_MAX_BUILD_VER_LEN) { wcnss_log(ERR, "invalid build version:%d\n", len); return;