aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/kapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/kapi.c')
-rw-r--r--drivers/mtd/ubi/kapi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c
index 146957c3380d..a70d58823f8d 100644
--- a/drivers/mtd/ubi/kapi.c
+++ b/drivers/mtd/ubi/kapi.c
@@ -480,9 +480,9 @@ int ubi_leb_erase(struct ubi_volume_desc *desc, int lnum)
480{ 480{
481 struct ubi_volume *vol = desc->vol; 481 struct ubi_volume *vol = desc->vol;
482 struct ubi_device *ubi = vol->ubi; 482 struct ubi_device *ubi = vol->ubi;
483 int err, vol_id = vol->vol_id; 483 int err;
484 484
485 dbg_msg("erase LEB %d:%d", vol_id, lnum); 485 dbg_msg("erase LEB %d:%d", vol->vol_id, lnum);
486 486
487 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME) 487 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
488 return -EROFS; 488 return -EROFS;
@@ -541,9 +541,8 @@ int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum)
541{ 541{
542 struct ubi_volume *vol = desc->vol; 542 struct ubi_volume *vol = desc->vol;
543 struct ubi_device *ubi = vol->ubi; 543 struct ubi_device *ubi = vol->ubi;
544 int vol_id = vol->vol_id;
545 544
546 dbg_msg("unmap LEB %d:%d", vol_id, lnum); 545 dbg_msg("unmap LEB %d:%d", vol->vol_id, lnum);
547 546
548 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME) 547 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
549 return -EROFS; 548 return -EROFS;
@@ -579,9 +578,8 @@ int ubi_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype)
579{ 578{
580 struct ubi_volume *vol = desc->vol; 579 struct ubi_volume *vol = desc->vol;
581 struct ubi_device *ubi = vol->ubi; 580 struct ubi_device *ubi = vol->ubi;
582 int vol_id = vol->vol_id;
583 581
584 dbg_msg("unmap LEB %d:%d", vol_id, lnum); 582 dbg_msg("unmap LEB %d:%d", vol->vol_id, lnum);
585 583
586 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME) 584 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
587 return -EROFS; 585 return -EROFS;