From: Markus Armbruster Date: Wed, 3 Dec 2014 10:28:02 +0000 (+0100) Subject: Drop superfluous conditionals around qemu_opts_del() X-Git-Tag: v2.3.0-rc0~140^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ad608803c46c0acc09114a2e8352742ffd20b6b;p=thirdparty%2Fqemu.git Drop superfluous conditionals around qemu_opts_del() Signed-off-by: Markus Armbruster Reviewed-by: Paolo Bonzini Reviewed-by: Gonglei Signed-off-by: Michael Tokarev --- diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 35fd00d26c7..901f289860d 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -1141,9 +1141,7 @@ static void device_finalize(Object *obj) NamedGPIOList *ngl, *next; DeviceState *dev = DEVICE(obj); - if (dev->opts) { - qemu_opts_del(dev->opts); - } + qemu_opts_del(dev->opts); QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) { QLIST_REMOVE(ngl, node); diff --git a/qemu-char.c b/qemu-char.c index a8b01da3ee8..ef84b536816 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3825,9 +3825,7 @@ void qemu_chr_delete(CharDriverState *chr) } g_free(chr->filename); g_free(chr->label); - if (chr->opts) { - qemu_opts_del(chr->opts); - } + qemu_opts_del(chr->opts); g_free(chr); }