Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e83d53fd authored by Talel Atias's avatar Talel Atias
Browse files

msm: ipa: keep iteration inside array boundary



This change keep the loop inside the real array boundary.
Old iteration method caused array index out of bound error.

Change-Id: Ied276b9dad2b4a486b34c6f35eed0ccf6136cf64
Signed-off-by: default avatarTalel Atias <tatias@codeaurora.org>
parent 7182485d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#ifdef CONFIG_DEBUG_FS

#include <linux/debugfs.h>
#include <linux/kernel.h>
#include <linux/stringify.h>
#include "ipa_i.h"
#include "ipa_rm_i.h"
@@ -765,7 +766,7 @@ static ssize_t ipa_read_stats(struct file *file, char __user *ubuf,
		cnt += nbytes;
	}

	for (i = 0; i < MAX_NUM_IMM_CMD; i++) {
	for (i = 0; i < ARRAY_SIZE(ipa_ic_name); i++) {
		nbytes = scnprintf(dbg_buff + cnt, IPA_MAX_MSG_LEN - cnt,
				"IC[%2u:%22s]=%u\n", i, ipa_ic_name[i],
				ipa_ctx->stats.imm_cmds[i]);