summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-08-10 12:42:06 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-10 12:42:04 -0700
commit97e5d2f34e3680dca80531e4504e81de52933a6a (patch)
treec291c90763169ef56b5aef0fd798302bc6174b12
parentc487afd8b1bb2a55d088937cd123a78dd777d7b2 (diff)
parent840f4d7c3c1035b1184c3e08e2a21aeec07503b6 (diff)
Merge "msm: gsi: fix memory corruption from debugfs"
-rw-r--r--drivers/platform/msm/gsi/gsi_dbg.c6
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));