]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/gpu/drm/nouveau/nv50_gpio.c
nouveau: off by one in nv50_gpio_location()
[net-next-2.6.git] / drivers / gpu / drm / nouveau / nv50_gpio.c
index c61782b314e799c59c2fc25972eaf8965169cbae..bb47ad737267a07ecfdc1071a6ebf7f2fdb6f9ec 100644 (file)
@@ -31,7 +31,7 @@ nv50_gpio_location(struct dcb_gpio_entry *gpio, uint32_t *reg, uint32_t *shift)
 {
        const uint32_t nv50_gpio_reg[4] = { 0xe104, 0xe108, 0xe280, 0xe284 };
 
-       if (gpio->line > 32)
+       if (gpio->line >= 32)
                return -EINVAL;
 
        *reg = nv50_gpio_reg[gpio->line >> 3];