X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=common%2Fcmd_mtdparts.c;h=422c069513843f930ce1eeccf2a9aa2e89b7fcf1;hb=cdc7732f3737f2bb97b77eb3d7c9da344bb73612;hp=40b6333ebf4cd15959811273da8617f30b15c360;hpb=4fa7613c50069b6821ace02b11a24b46dcbbec5e;p=u-boot diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c index 40b6333ebf..422c069513 100644 --- a/common/cmd_mtdparts.c +++ b/common/cmd_mtdparts.c @@ -292,6 +292,7 @@ static int get_mtd_info(u8 type, u8 num, struct mtd_info **mtd) printf("Device %s not found!\n", mtd_dev); return 1; } + put_mtd_device(*mtd); return 0; } @@ -861,7 +862,7 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_ debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n", id->type, MTD_DEV_TYPE(id->type), id->num, id->mtd_id); - debug("parsing partitions %.*s\n", (pend ? pend - p : strlen(p)), p); + debug("parsing partitions %.*s\n", (int)(pend ? pend - p : strlen(p)), p); /* parse partitions */ @@ -1006,7 +1007,7 @@ static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_ list_for_each(entry, &mtdids) { id = list_entry(entry, struct mtdids, link); - debug("entry: '%s' (len = %d)\n", + debug("entry: '%s' (len = %zu)\n", id->mtd_id, strlen(id->mtd_id)); if (mtd_id_len != strlen(id->mtd_id))