HID: roccat: potential out of bounds in pyra_sysfs_write_settings()
[cascardo/linux.git] / mm / frontswap.c
index f2a3571..8d82809 100644 (file)
@@ -182,7 +182,7 @@ void __frontswap_init(unsigned type, unsigned long *map)
        if (frontswap_ops)
                frontswap_ops->init(type);
        else {
-               BUG_ON(type > MAX_SWAPFILES);
+               BUG_ON(type >= MAX_SWAPFILES);
                set_bit(type, need_init);
        }
 }