depmod: Support modules.order with duplicate lines
If the same line exists multiple times in modules.order, consider only
the first, since this is the earliest position requested.
This also makes sure that index iterator never turns positive or would
ever trigger a signed integer overflow.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/158
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>