diff options
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r-- | drivers/mtd/ubi/scan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index 6b7c0c4baf07..de7b2f1c4113 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
45 | #include <linux/crc32.h> | 45 | #include <linux/crc32.h> |
46 | #include <linux/math64.h> | 46 | #include <linux/math64.h> |
47 | #include <linux/random.h> | ||
47 | #include "ubi.h" | 48 | #include "ubi.h" |
48 | 49 | ||
49 | #ifdef CONFIG_MTD_UBI_DEBUG_PARANOID | 50 | #ifdef CONFIG_MTD_UBI_DEBUG_PARANOID |
@@ -956,6 +957,7 @@ static int check_what_we_have(const struct ubi_device *ubi, | |||
956 | */ | 957 | */ |
957 | si->is_empty = 1; | 958 | si->is_empty = 1; |
958 | ubi_msg("empty MTD device detected"); | 959 | ubi_msg("empty MTD device detected"); |
960 | get_random_bytes(&ubi->image_seq, sizeof(ubi->image_seq)); | ||
959 | } else { | 961 | } else { |
960 | ubi_err("MTD device possibly contains non-UBI data, " | 962 | ubi_err("MTD device possibly contains non-UBI data, " |
961 | "refusing it"); | 963 | "refusing it"); |