Skip to content

Commit bf36b4b

Browse files
committed
modpost: fix the missed iteration for the max bit in do_input()
This loop should iterate over the range from 'min' to 'max' inclusively. The last interation is missed. Fixes: 1d8f430 ("[PATCH] Input: add modalias support") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
1 parent 7a6c355 commit bf36b4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/mod/file2alias.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ static void do_input(char *alias,
656656

657657
for (i = min / BITS_PER_LONG; i < max / BITS_PER_LONG + 1; i++)
658658
arr[i] = TO_NATIVE(arr[i]);
659-
for (i = min; i < max; i++)
659+
for (i = min; i <= max; i++)
660660
if (arr[i / BITS_PER_LONG] & (1ULL << (i%BITS_PER_LONG)))
661661
sprintf(alias + strlen(alias), "%X,*", i);
662662
}

0 commit comments

Comments
 (0)