All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] Drop superfluous conditionals around qemu_opts_del()
@ 2014-12-03 10:28 ` Markus Armbruster
  0 siblings, 0 replies; 8+ messages in thread
From: Markus Armbruster @ 2014-12-03 10:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, pbonzini

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/core/qdev.c | 4 +---
 qemu-char.c    | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 35fd00d..901f289 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 a8b01da..ef84b53 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);
 }
 
-- 
1.9.3



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-12-10  8:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 10:28 [Qemu-trivial] [PATCH] Drop superfluous conditionals around qemu_opts_del() Markus Armbruster
2014-12-03 10:28 ` [Qemu-devel] " Markus Armbruster
2014-12-03 10:30 ` [Qemu-trivial] " Paolo Bonzini
2014-12-03 10:30   ` [Qemu-devel] " Paolo Bonzini
2014-12-03 10:33 ` [Qemu-trivial] " Gonglei
2014-12-03 10:33   ` Gonglei
2014-12-10  8:27 ` [Qemu-trivial] " Michael Tokarev
2014-12-10  8:27   ` [Qemu-devel] " Michael Tokarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.