diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index c38645106783..bdc1bf7bf22d 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c @@ -252,6 +252,9 @@ static int find_free_channels(unsigned long *bitmap, unsigned int start, ; if (i == width) return pos; + + /* step over [pos..pos+i) to continue search */ + pos += i; } return -1;