diff options
| author | Skylar Chang <chiaweic@codeaurora.org> | 2016-08-02 18:16:59 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-08 10:37:54 -0700 |
| commit | 840f4d7c3c1035b1184c3e08e2a21aeec07503b6 (patch) | |
| tree | 4a14533dda99e6a9ff9b400d166bf19f7813aa91 /drivers/platform | |
| parent | e94b446eac88a43e42ecde105275d48b677ea5b3 (diff) | |
msm: gsi: fix memory corruption from debugfs
Fix to GSI reset stats logic to clear the correct stats per channel
Change-Id: I94ae8c769ec2868a291e75a2f47c85bd8a449937
CRs-Fixed: 1046484
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Diffstat (limited to 'drivers/platform')
| -rw-r--r-- | drivers/platform/msm/gsi/gsi_dbg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/msm/gsi/gsi_dbg.c b/drivers/platform/msm/gsi/gsi_dbg.c index bd8cdf3f9770..2ab8b79acc6d 100644 --- a/drivers/platform/msm/gsi/gsi_dbg.c +++ b/drivers/platform/msm/gsi/gsi_dbg.c @@ -653,11 +653,11 @@ static ssize_t gsi_rst_stats(struct file *file, } else if (ch_id < 0 || ch_id >= GSI_MAX_CHAN || !gsi_ctx->chan[ch_id].allocated) { goto error; + } else { + min = ch_id; + max = ch_id + 1; } - min = ch_id; - max = ch_id + 1; - for (ch_id = min; ch_id < max; ch_id++) memset(&gsi_ctx->chan[ch_id].stats, 0, sizeof(gsi_ctx->chan[ch_id].stats)); |
