From fdc1c37ba49a24bb76bd34bbf7daf20ed64b13a4 Mon Sep 17 00:00:00 2001 From: Kyungwoo Kang Date: Thu, 23 Nov 2017 18:45:38 +0900 Subject: [PATCH] [COMMON] usi_v2: Fix prevent code. CID 201502 Comparison with signed and unsigned int might cause infinite value. Change-Id: I7376fa085a84e2e6263e78cbe1cb89461bd103c4 Signed-off-by: Kyungwoo Kang --- drivers/soc/samsung/usi_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/samsung/usi_v2.c b/drivers/soc/samsung/usi_v2.c index 5a6f1e4e19de..23fc44af0160 100644 --- a/drivers/soc/samsung/usi_v2.c +++ b/drivers/soc/samsung/usi_v2.c @@ -38,7 +38,7 @@ static const struct usi_v2_mode usi_v2_modes[] = { static int get_usi_v2_mode(const char* mode_name) { - int i; + unsigned int i; for (i = 0; i < sizeof(usi_v2_modes)/sizeof(struct usi_v2_mode); i++) { if (!strncmp(mode_name, usi_v2_modes[i].name, -- 2.20.1