]> git.hungrycats.org Git - linux/commitdiff
[AGPGART] Fix MAX_HAMMER_GARTS off by one.
authorDave Jones <davej@redhat.com>
Wed, 19 Nov 2003 20:06:27 +0000 (20:06 +0000)
committerDave Jones <davej@delerium.codemonkey.org.uk>
Wed, 19 Nov 2003 20:06:27 +0000 (20:06 +0000)
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.

drivers/char/agp/amd64-agp.c

index f8583407a8fd2762861b4f566f715e26047c1742..a254018cc3644dd4e47d7b0adc5aa8a80c67605e 100644 (file)
@@ -357,7 +357,7 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
                hammers[i++] = loop_dev;
                nr_garts = i;
 #ifdef CONFIG_SMP
-               if (i == MAX_HAMMER_GARTS) { 
+               if (i > MAX_HAMMER_GARTS) { 
                        printk(KERN_INFO PFX "Too many northbridges for AGP\n");
                        return -1;
                }