diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-07 14:31:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-07 14:31:03 -0400 |
commit | ccfeef0ff76ebd632ae51bc56700f0072c4f1864 (patch) | |
tree | 83ec5932dac631a455a69212b505f68f57f68cdf /drivers/mtd/ubi | |
parent | 42933bac11e811f02200c944d8562a15f8ec4ff0 (diff) | |
parent | 6bef0b67474d71e0d6484cbabcc87657a1176d8d (diff) |
Merge branch 'for-linus' of git://git.infradead.org/ubifs-2.6
* 'for-linus' of git://git.infradead.org/ubifs-2.6:
UBI: do not select KALLSYMS_ALL
UBI: do not compare array with NULL
UBI: check if we are in RO mode in the erase routine
UBIFS: fix debugging failure in dbg_check_space_info
UBIFS: fix error path in dbg_debugfs_init_fs
UBIFS: unify error path dbg_debugfs_init_fs
UBIFS: do not select KALLSYMS_ALL
UBIFS: fix assertion warnings
UBIFS: fix oops on error path in read_pnode
UBIFS: do not read flash unnecessarily
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mtd/ubi/io.c | 8 | ||||
-rw-r--r-- | drivers/mtd/ubi/vmt.c | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig index 6abeb4f1340..4dcc752a0c0 100644 --- a/drivers/mtd/ubi/Kconfig +++ b/drivers/mtd/ubi/Kconfig | |||
@@ -56,7 +56,7 @@ config MTD_UBI_DEBUG | |||
56 | bool "UBI debugging" | 56 | bool "UBI debugging" |
57 | depends on SYSFS | 57 | depends on SYSFS |
58 | select DEBUG_FS | 58 | select DEBUG_FS |
59 | select KALLSYMS_ALL if KALLSYMS && DEBUG_KERNEL | 59 | select KALLSYMS |
60 | help | 60 | help |
61 | This option enables UBI debugging. | 61 | This option enables UBI debugging. |
62 | 62 | ||
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index eededf94f5a..e347cc4388e 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c | |||
@@ -344,6 +344,12 @@ static int do_sync_erase(struct ubi_device *ubi, int pnum) | |||
344 | wait_queue_head_t wq; | 344 | wait_queue_head_t wq; |
345 | 345 | ||
346 | dbg_io("erase PEB %d", pnum); | 346 | dbg_io("erase PEB %d", pnum); |
347 | ubi_assert(pnum >= 0 && pnum < ubi->peb_count); | ||
348 | |||
349 | if (ubi->ro_mode) { | ||
350 | ubi_err("read-only mode"); | ||
351 | return -EROFS; | ||
352 | } | ||
347 | 353 | ||
348 | retry: | 354 | retry: |
349 | init_waitqueue_head(&wq); | 355 | init_waitqueue_head(&wq); |
@@ -390,7 +396,7 @@ retry: | |||
390 | if (err) | 396 | if (err) |
391 | return err; | 397 | return err; |
392 | 398 | ||
393 | if (ubi_dbg_is_erase_failure() && !err) { | 399 | if (ubi_dbg_is_erase_failure()) { |
394 | dbg_err("cannot erase PEB %d (emulated)", pnum); | 400 | dbg_err("cannot erase PEB %d (emulated)", pnum); |
395 | return -EIO; | 401 | return -EIO; |
396 | } | 402 | } |
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index b79e0dea363..366eb70219a 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c | |||
@@ -790,11 +790,6 @@ static int paranoid_check_volume(struct ubi_device *ubi, int vol_id) | |||
790 | goto fail; | 790 | goto fail; |
791 | } | 791 | } |
792 | 792 | ||
793 | if (!vol->name) { | ||
794 | ubi_err("NULL volume name"); | ||
795 | goto fail; | ||
796 | } | ||
797 | |||
798 | n = strnlen(vol->name, vol->name_len + 1); | 793 | n = strnlen(vol->name, vol->name_len + 1); |
799 | if (n != vol->name_len) { | 794 | if (n != vol->name_len) { |
800 | ubi_err("bad name_len %lld", n); | 795 | ubi_err("bad name_len %lld", n); |