Commit d990de21 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[AGPGART] Fix MAX_HAMMER_GARTS off by one.

James Jones spotted that on an 8-way hammer, we would print the
'too many northbridges'. We should abort at 1 > max, not at max.
parent 6cd8ae1f
...@@ -357,7 +357,7 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr) ...@@ -357,7 +357,7 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
hammers[i++] = loop_dev; hammers[i++] = loop_dev;
nr_garts = i; nr_garts = i;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (i == MAX_HAMMER_GARTS) { if (i > MAX_HAMMER_GARTS) {
printk(KERN_INFO PFX "Too many northbridges for AGP\n"); printk(KERN_INFO PFX "Too many northbridges for AGP\n");
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment