aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/vmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/vmt.c')
-rw-r--r--drivers/mtd/ubi/vmt.c7
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 @@
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include "ubi.h" 29#include "ubi.h"
30 30
31#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID 31#ifdef CONFIG_MTD_UBI_DEBUG
32static int paranoid_check_volumes(struct ubi_device *ubi); 32static int paranoid_check_volumes(struct ubi_device *ubi);
33#else 33#else
34#define paranoid_check_volumes(ubi) 0 34#define paranoid_check_volumes(ubi) 0
@@ -711,7 +711,7 @@ void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol)
711 volume_sysfs_close(vol); 711 volume_sysfs_close(vol);
712} 712}
713 713
714#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID 714#ifdef CONFIG_MTD_UBI_DEBUG
715 715
716/** 716/**
717 * paranoid_check_volume - check volume information. 717 * paranoid_check_volume - check volume information.
@@ -876,6 +876,9 @@ static int paranoid_check_volumes(struct ubi_device *ubi)
876{ 876{
877 int i, err = 0; 877 int i, err = 0;
878 878
879 if (!(ubi_chk_flags & UBI_CHK_GEN))
880 return 0;
881
879 for (i = 0; i < ubi->vtbl_slots; i++) { 882 for (i = 0; i < ubi->vtbl_slots; i++) {
880 err = paranoid_check_volume(ubi, i); 883 err = paranoid_check_volume(ubi, i);
881 if (err) 884 if (err)