summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-12-21 03:44:03 -0800
committerLinux Build Service Account <lnxbuild@localhost>2018-12-21 03:44:03 -0800
commitf9818b739d0e914c22a5a654bbc9339f666fe622 (patch)
tree153f773d3cd6c8caaa41a31bbd572717940c10d8
parent9d5d4f27aaf99e92d775382e7994253e6d523610 (diff)
parent6ef2dfa1d6584c4a9394e25c85c57839ed56bb13 (diff)
Merge 6ef2dfa1d6584c4a9394e25c85c57839ed56bb13 on remote branch
Change-Id: Ic91dc5a45e3464a70a5d610b05d7e96d7cc487cc
-rw-r--r--hif/src/ath_procfs.c6
-rw-r--r--wmi/src/wmi_unified_tlv.c20
2 files changed, 16 insertions, 10 deletions
diff --git a/hif/src/ath_procfs.c b/hif/src/ath_procfs.c
index f4c62b42a3e7..6835da343d7c 100644
--- a/hif/src/ath_procfs.c
+++ b/hif/src/ath_procfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014, 2016-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, 2016-2017, 2018 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -99,8 +99,10 @@ static ssize_t ath_procfs_diag_read(struct file *file, char __user *buf,
}
out:
- if (rv)
+ if (rv) {
+ qdf_mem_free(read_buffer);
return -EIO;
+ }
if (copy_to_user(buf, read_buffer, count)) {
qdf_mem_free(read_buffer);
diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c
index c063136a00bf..1d0fe3c12174 100644
--- a/wmi/src/wmi_unified_tlv.c
+++ b/wmi/src/wmi_unified_tlv.c
@@ -4224,14 +4224,18 @@ static QDF_STATUS extract_sar_limit_event_tlv(wmi_unified_t wmi_handle,
}
row_in = param_buf->sar_get_limits;
- row_out = &event->sar_limit_row[0];
- for (row = 0; row < event->num_limit_rows; row++) {
- row_out->band_id = row_in->band_id;
- row_out->chain_id = row_in->chain_id;
- row_out->mod_id = row_in->mod_id;
- row_out->limit_value = row_in->limit_value;
- row_out++;
- row_in++;
+ if (row_in) {
+ row_out = &event->sar_limit_row[0];
+ for (row = 0; row < event->num_limit_rows; row++) {
+ row_out->band_id = row_in->band_id;
+ row_out->chain_id = row_in->chain_id;
+ row_out->mod_id = row_in->mod_id;
+ row_out->limit_value = row_in->limit_value;
+ row_out++;
+ row_in++;
+ }
+ } else {
+ WMI_LOGD("sar_get_limits is NULL");
}
return QDF_STATUS_SUCCESS;