/* Add provided partition to the partition list of a given device. */
static int part_add(struct mtd_device *dev, struct part_info *part)
/* Add provided partition to the partition list of a given device. */
static int part_add(struct mtd_device *dev, struct part_info *part)
{
	if (part_validate(dev->id, part) != 0)
		return 1;
	if (part_sort_add(dev, part) != 0)
		return 1;
	return 0;
}