[COMMON] usi_v2: Fix prevent code.
authorKyungwoo Kang <kwoo.kang@samsung.com>
Thu, 23 Nov 2017 09:45:38 +0000 (18:45 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Wed, 30 May 2018 04:36:58 +0000 (13:36 +0900)
CID 201502 Comparison with signed and unsigned int might
cause infinite value.

Change-Id: I7376fa085a84e2e6263e78cbe1cb89461bd103c4
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
drivers/soc/samsung/usi_v2.c

index 5a6f1e4e19de3f76e2bff8787563e3ecac63ae43..23fc44af01605dea2b643a6aad3ef4772ac9ea96 100644 (file)
@@ -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,