summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorYuanyuan Liu <yuanliu@codeaurora.org>2017-02-06 15:13:12 -0800
committerYuanyuan Liu <yuanliu@codeaurora.org>2017-02-06 15:16:06 -0800
commit31767415ec4115b988a5f58fc672c2f3cd609d00 (patch)
treefdf17bfa1b8babb2d56bbc4893dfea4bfd1ab963 /drivers/soc
parent20e1ed9259bf1c7c40b76b13d74d476608cc1d49 (diff)
icnss: Fix error check of athdiag read data_len
Fix error check of data_len for athdiag read message. Report error when response message's data_len is smaller than what is expected. CRs-Fixed: 2002939 Change-Id: I87c0c6265934ac7a3aad5dfa471c23332b7f6996 Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/icnss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c
index 16ee98d8e4e0..b378b43cde3f 100644
--- a/drivers/soc/qcom/icnss.c
+++ b/drivers/soc/qcom/icnss.c
@@ -1339,7 +1339,7 @@ static int wlfw_athdiag_read_send_sync_msg(struct icnss_priv *priv,
goto out;
}
- if (!resp->data_valid || resp->data_len <= data_len) {
+ if (!resp->data_valid || resp->data_len < data_len) {
icnss_pr_err("Athdiag read data is invalid, data_valid = %u, data_len = %u\n",
resp->data_valid, resp->data_len);
ret = -EINVAL;