From d4edef51b0b75e3e95e366cedf5b5712857d5bb6 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 26 Oct 2017 13:13:44 +0100 Subject: [PATCH] [ft-lib/dm-ioctl] Remove a couple of fixmes --- ft-lib/dm-ioctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ft-lib/dm-ioctl.c b/ft-lib/dm-ioctl.c index a40b921..bca2d04 100644 --- a/ft-lib/dm-ioctl.c +++ b/ft-lib/dm-ioctl.c @@ -304,6 +304,9 @@ static int dev_cmd(struct dm_interface *dmi, const char *name, int request, unsi int r; struct dm_ioctl *ctl = alloc_ctl(0); + if (!ctl) + return -ENOMEM; + ctl->flags = flags; r = copy_name(ctl, name); if (r) { @@ -400,8 +403,6 @@ static struct target *tb_get(struct target_builder *tb) } //---------------------------------------------------------------- -// FIXME: provide some way of freeing a target list. -// FIXME: check the result from alloc_ctl is always being checked. static size_t calc_load_payload(struct target *t) {