diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-05 21:00:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-05 21:00:22 -0500 |
commit | d7fe321eeba58f0a37cc4324d10e52092be457e0 (patch) | |
tree | d77116255f52e5b7b9484b4df41c55126cf06882 | |
parent | 4a0d3f3afddf01dfcfdcc826f0b706dbc01f4ef4 (diff) | |
parent | f7f0283776b6fe33f87f6a2ef15b1feb49ef6dac (diff) |
Merge branch 'for-linus' of git://git.infradead.org/~dedekind/ubi-2.6
* 'for-linus' of git://git.infradead.org/~dedekind/ubi-2.6:
UBI: mtd/ubi/vtbl.c: fix memory leak
UBI: fix sparse errors in ubi.h
UBI: fix error message
UBI: silence warning
-rw-r--r-- | drivers/mtd/ubi/build.c | 4 | ||||
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 10 | ||||
-rw-r--r-- | drivers/mtd/ubi/vmt.c | 4 | ||||
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 1 |
4 files changed, 11 insertions, 8 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 6ac81e35355c..275960462970 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c | |||
@@ -1000,8 +1000,8 @@ static int __init ubi_init(void) | |||
1000 | mutex_unlock(&ubi_devices_mutex); | 1000 | mutex_unlock(&ubi_devices_mutex); |
1001 | if (err < 0) { | 1001 | if (err < 0) { |
1002 | put_mtd_device(mtd); | 1002 | put_mtd_device(mtd); |
1003 | printk(KERN_ERR "UBI error: cannot attach %s\n", | 1003 | printk(KERN_ERR "UBI error: cannot attach mtd%d\n", |
1004 | p->name); | 1004 | mtd->index); |
1005 | goto out_detach; | 1005 | goto out_detach; |
1006 | } | 1006 | } |
1007 | } | 1007 | } |
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 457710615261..a548c1d28fa8 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -217,11 +217,11 @@ struct ubi_volume { | |||
217 | void *upd_buf; | 217 | void *upd_buf; |
218 | 218 | ||
219 | int *eba_tbl; | 219 | int *eba_tbl; |
220 | int checked:1; | 220 | unsigned int checked:1; |
221 | int corrupted:1; | 221 | unsigned int corrupted:1; |
222 | int upd_marker:1; | 222 | unsigned int upd_marker:1; |
223 | int updating:1; | 223 | unsigned int updating:1; |
224 | int changing_leb:1; | 224 | unsigned int changing_leb:1; |
225 | 225 | ||
226 | #ifdef CONFIG_MTD_UBI_GLUEBI | 226 | #ifdef CONFIG_MTD_UBI_GLUEBI |
227 | /* | 227 | /* |
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index a3ca2257e601..5be58d85c639 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c | |||
@@ -376,7 +376,9 @@ out_sysfs: | |||
376 | get_device(&vol->dev); | 376 | get_device(&vol->dev); |
377 | volume_sysfs_close(vol); | 377 | volume_sysfs_close(vol); |
378 | out_gluebi: | 378 | out_gluebi: |
379 | ubi_destroy_gluebi(vol); | 379 | if (ubi_destroy_gluebi(vol)) |
380 | dbg_err("cannot destroy gluebi for volume %d:%d", | ||
381 | ubi->ubi_num, vol_id); | ||
380 | out_cdev: | 382 | out_cdev: |
381 | cdev_del(&vol->cdev); | 383 | cdev_del(&vol->cdev); |
382 | out_mapping: | 384 | out_mapping: |
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 56fc3fbce838..af36b12be278 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -519,6 +519,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si, | |||
519 | if (ubi->autoresize_vol_id != -1) { | 519 | if (ubi->autoresize_vol_id != -1) { |
520 | ubi_err("more then one auto-resize volume (%d " | 520 | ubi_err("more then one auto-resize volume (%d " |
521 | "and %d)", ubi->autoresize_vol_id, i); | 521 | "and %d)", ubi->autoresize_vol_id, i); |
522 | kfree(vol); | ||
522 | return -EINVAL; | 523 | return -EINVAL; |
523 | } | 524 | } |
524 | 525 | ||