- if (trx_mtd_master == NULL)
- goto err;
-
- printk(KERN_INFO PFX "creating TRX partitions in '%s'\n",
- trx_mtd_master->name);
-
- err = add_mtd_partitions(trx_mtd_master, trx_parts, trx_nr_parts);
- if (err) {
- printk(KERN_ALERT PFX "creating TRX partitions failed\n");
- goto err;
- }
-
- for (i=0; i<trx_nr_parts; i++) {
- /* TODO: add error checking */
- add_mtd_device(trx_mtds[i]);
- }
-
- if (ROOT_DEV == 0 && trx_rootfs_part >= 0) {
- printk(KERN_INFO PFX "set '%s' to be root filesystem\n",
- trx_mtds[trx_rootfs_part]->name);
- ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, trx_mtds[trx_rootfs_part]->index);
- }
-
- return 0;
-
-err:
- return -1;