int mmc_get_next_devnum(void)
{
- int ret;
-
- ret = blk_find_max_devnum(IF_TYPE_MMC);
- if (ret < 0)
- return ret;
-
- return ret;
+ return blk_find_max_devnum(IF_TYPE_MMC);
}
struct blk_desc *mmc_get_blk_desc(struct mmc *mmc)
struct udevice *mmc_dev = dev_get_parent(bdev);
struct mmc *mmc = mmc_get_mmc_dev(mmc_dev);
struct blk_desc *desc = dev_get_uclass_platdata(bdev);
- int ret;
if (desc->hwpart == hwpart)
return 0;
if (mmc->part_config == MMCPART_NOAVAILABLE)
return -EMEDIUMTYPE;
- ret = mmc_switch_part(mmc, hwpart);
- if (ret)
- return ret;
-
- return 0;
+ return mmc_switch_part(mmc, hwpart);
}
static const struct blk_ops mmc_blk_ops = {