aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/vtbl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/vtbl.c')
-rw-r--r--drivers/mtd/ubi/vtbl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 0b8141fc5c2..fd3bf770f51 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -62,7 +62,7 @@
62#include <asm/div64.h> 62#include <asm/div64.h>
63#include "ubi.h" 63#include "ubi.h"
64 64
65#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID 65#ifdef CONFIG_MTD_UBI_DEBUG
66static void paranoid_vtbl_check(const struct ubi_device *ubi); 66static void paranoid_vtbl_check(const struct ubi_device *ubi);
67#else 67#else
68#define paranoid_vtbl_check(ubi) 68#define paranoid_vtbl_check(ubi)
@@ -868,7 +868,7 @@ out_free:
868 return err; 868 return err;
869} 869}
870 870
871#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID 871#ifdef CONFIG_MTD_UBI_DEBUG
872 872
873/** 873/**
874 * paranoid_vtbl_check - check volume table. 874 * paranoid_vtbl_check - check volume table.
@@ -876,10 +876,13 @@ out_free:
876 */ 876 */
877static void paranoid_vtbl_check(const struct ubi_device *ubi) 877static void paranoid_vtbl_check(const struct ubi_device *ubi)
878{ 878{
879 if (!(ubi_chk_flags & UBI_CHK_GEN))
880 return;
881
879 if (vtbl_check(ubi, ubi->vtbl)) { 882 if (vtbl_check(ubi, ubi->vtbl)) {
880 ubi_err("paranoid check failed"); 883 ubi_err("paranoid check failed");
881 BUG(); 884 BUG();
882 } 885 }
883} 886}
884 887
885#endif /* CONFIG_MTD_UBI_DEBUG_PARANOID */ 888#endif /* CONFIG_MTD_UBI_DEBUG */