diff options
Diffstat (limited to 'drivers/mtd/ubi/vmt.c')
-rw-r--r-- | drivers/mtd/ubi/vmt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index c47620dfc722..b79e0dea3632 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c @@ -28,7 +28,7 @@ #include <linux/slab.h> #include "ubi.h" -#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID +#ifdef CONFIG_MTD_UBI_DEBUG static int paranoid_check_volumes(struct ubi_device *ubi); #else #define paranoid_check_volumes(ubi) 0 @@ -711,7 +711,7 @@ void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol) volume_sysfs_close(vol); } -#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID +#ifdef CONFIG_MTD_UBI_DEBUG /** * paranoid_check_volume - check volume information. @@ -876,6 +876,9 @@ static int paranoid_check_volumes(struct ubi_device *ubi) { int i, err = 0; + if (!(ubi_chk_flags & UBI_CHK_GEN)) + return 0; + for (i = 0; i < ubi->vtbl_slots; i++) { err = paranoid_check_volume(ubi, i); if (err) |