There's no reason to believe that an MMC device will incorrectly report
its capacity. Remove error checking of this value from ums_disk_init()
to simplify it.
Cc: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
static struct ums *ums_disk_init(struct mmc *mmc)
{
- uint64_t mmc_end_sector = mmc->capacity / SECTOR_SIZE;
-
- if (!mmc_end_sector) {
- error("MMC capacity is not valid");
- return NULL;
- }
-
ums_dev.block_dev = &mmc->block_dev;
ums_dev.start_sector = 0;
- ums_dev.num_sectors = mmc_end_sector;
+ ums_dev.num_sectors = mmc->capacity / SECTOR_SIZE;
printf("UMS: disk start sector: %#x, count: %#x\n",
ums_dev.start_sector, ums_dev.num_sectors);