Commit d7fe321e authored by Linus Torvalds's avatar Linus Torvalds

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
parents 4a0d3f3a f7f02837
...@@ -1000,8 +1000,8 @@ static int __init ubi_init(void) ...@@ -1000,8 +1000,8 @@ static int __init ubi_init(void)
mutex_unlock(&ubi_devices_mutex); mutex_unlock(&ubi_devices_mutex);
if (err < 0) { if (err < 0) {
put_mtd_device(mtd); put_mtd_device(mtd);
printk(KERN_ERR "UBI error: cannot attach %s\n", printk(KERN_ERR "UBI error: cannot attach mtd%d\n",
p->name); mtd->index);
goto out_detach; goto out_detach;
} }
} }
......
...@@ -217,11 +217,11 @@ struct ubi_volume { ...@@ -217,11 +217,11 @@ struct ubi_volume {
void *upd_buf; void *upd_buf;
int *eba_tbl; int *eba_tbl;
int checked:1; unsigned int checked:1;
int corrupted:1; unsigned int corrupted:1;
int upd_marker:1; unsigned int upd_marker:1;
int updating:1; unsigned int updating:1;
int changing_leb:1; unsigned int changing_leb:1;
#ifdef CONFIG_MTD_UBI_GLUEBI #ifdef CONFIG_MTD_UBI_GLUEBI
/* /*
......
...@@ -376,7 +376,9 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req) ...@@ -376,7 +376,9 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req)
get_device(&vol->dev); get_device(&vol->dev);
volume_sysfs_close(vol); volume_sysfs_close(vol);
out_gluebi: out_gluebi:
ubi_destroy_gluebi(vol); if (ubi_destroy_gluebi(vol))
dbg_err("cannot destroy gluebi for volume %d:%d",
ubi->ubi_num, vol_id);
out_cdev: out_cdev:
cdev_del(&vol->cdev); cdev_del(&vol->cdev);
out_mapping: out_mapping:
......
...@@ -519,6 +519,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si, ...@@ -519,6 +519,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
if (ubi->autoresize_vol_id != -1) { if (ubi->autoresize_vol_id != -1) {
ubi_err("more then one auto-resize volume (%d " ubi_err("more then one auto-resize volume (%d "
"and %d)", ubi->autoresize_vol_id, i); "and %d)", ubi->autoresize_vol_id, i);
kfree(vol);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment