Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux...
[firefly-linux-kernel-4.4.55.git] / arch / avr32 / mach-at32ap / pio.c
index 4f61378c3453792af416dae65ffa1e9a8c70f4ff..456128174b1794e7b2806d4f7ed135a481f9b8ac 100644 (file)
@@ -435,7 +435,7 @@ void __init at32_init_pio(struct platform_device *pdev)
        struct resource *regs;
        struct pio_device *pio;
 
-       if (pdev->id > MAX_NR_PIO_DEVICES) {
+       if (pdev->id >= MAX_NR_PIO_DEVICES) {
                dev_err(&pdev->dev, "only %d PIO devices supported\n",
                        MAX_NR_PIO_DEVICES);
                return;