]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Drop superfluous conditionals around qemu_opts_del()
authorMarkus Armbruster <armbru@redhat.com>
Wed, 3 Dec 2014 10:28:02 +0000 (11:28 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 10 Dec 2014 08:27:02 +0000 (11:27 +0300)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/core/qdev.c
qemu-char.c

index 35fd00d26c777e1ee565703982dbaa5617c861a3..901f289860d5dae982124b49ecce93b8ed9b82e0 100644 (file)
@@ -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);
index a8b01da3ee8fdf1561a37b0e273b1a97c9949608..ef84b5368160edcb710a41ad0b3085597c057978 100644 (file)
@@ -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);
 }