diff options
Diffstat (limited to 'drivers/misc/sgi-gru/grumain.c')
-rw-r--r-- | drivers/misc/sgi-gru/grumain.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/sgi-gru/grumain.c b/drivers/misc/sgi-gru/grumain.c index 3398e54a762b..4e6e8c3554f0 100644 --- a/drivers/misc/sgi-gru/grumain.c +++ b/drivers/misc/sgi-gru/grumain.c | |||
@@ -150,7 +150,7 @@ static unsigned long reserve_resources(unsigned long *p, int n, int mmax, | |||
150 | unsigned long bits = 0; | 150 | unsigned long bits = 0; |
151 | int i; | 151 | int i; |
152 | 152 | ||
153 | do { | 153 | while (n--) { |
154 | i = find_first_bit(p, mmax); | 154 | i = find_first_bit(p, mmax); |
155 | if (i == mmax) | 155 | if (i == mmax) |
156 | BUG(); | 156 | BUG(); |
@@ -158,7 +158,7 @@ static unsigned long reserve_resources(unsigned long *p, int n, int mmax, | |||
158 | __set_bit(i, &bits); | 158 | __set_bit(i, &bits); |
159 | if (idx) | 159 | if (idx) |
160 | *idx++ = i; | 160 | *idx++ = i; |
161 | } while (--n); | 161 | } |
162 | return bits; | 162 | return bits; |
163 | } | 163 | } |
164 | 164 | ||