clk: at91: sama7g5: fix compilation error
[linux-2.6-microblaze.git] / drivers / lightnvm / core.c
index fe78bf0..c1bcac7 100644 (file)
@@ -1311,8 +1311,9 @@ static long nvm_ioctl_get_devices(struct file *file, void __user *arg)
                strlcpy(info->bmname, "gennvm", sizeof(info->bmname));
                i++;
 
-               if (i > 31) {
-                       pr_err("max 31 devices can be reported.\n");
+               if (i >= ARRAY_SIZE(devices->info)) {
+                       pr_err("max %zd devices can be reported.\n",
+                              ARRAY_SIZE(devices->info));
                        break;
                }
        }