aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/cdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/cdev.c')
-rw-r--r--drivers/mtd/ubi/cdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index 12777da47d3b..7697eda2d58c 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -60,7 +60,7 @@ static struct ubi_device *major_to_device(int major)
60{ 60{
61 int i; 61 int i;
62 62
63 for (i = 0; i < ubi_devices_cnt; i++) 63 for (i = 0; i < UBI_MAX_DEVICES; i++)
64 if (ubi_devices[i] && MAJOR(ubi_devices[i]->cdev.dev) == major) 64 if (ubi_devices[i] && MAJOR(ubi_devices[i]->cdev.dev) == major)
65 return ubi_devices[i]; 65 return ubi_devices[i];
66 BUG(); 66 BUG();