mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
modpost: fix the missed iteration for the max bit in do_input()
[ Upstream commitbf36b4bf1b] This loop should iterate over the range from 'min' to 'max' inclusively. The last interation is missed. Fixes:1d8f430c15("[PATCH] Input: add modalias support") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f133ad12fe
commit
2a44d48d32
@@ -742,7 +742,7 @@ static void do_input(char *alias,
|
|||||||
|
|
||||||
for (i = min / BITS_PER_LONG; i < max / BITS_PER_LONG + 1; i++)
|
for (i = min / BITS_PER_LONG; i < max / BITS_PER_LONG + 1; i++)
|
||||||
arr[i] = TO_NATIVE(arr[i]);
|
arr[i] = TO_NATIVE(arr[i]);
|
||||||
for (i = min; i < max; i++)
|
for (i = min; i <= max; i++)
|
||||||
if (arr[i / BITS_PER_LONG] & (1ULL << (i%BITS_PER_LONG)))
|
if (arr[i / BITS_PER_LONG] & (1ULL << (i%BITS_PER_LONG)))
|
||||||
sprintf(alias + strlen(alias), "%X,*", i);
|
sprintf(alias + strlen(alias), "%X,*", i);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user