« Previous | Next » 

Revision 7598b41c

ID7598b41cfa13b2469b9411eee237a5c551e0ffaf

Added by Hans de Goede about 11 years ago

usb-serial: Remove double call to qemu_chr_add_handlers( NULL )

usb-serial has a qdev chardev property, and hw/qdev-properties-system.c
already contains:

static void release_chr(Object *obj, const char *name, void *opaque) {
DeviceState *dev = DEVICE;
Property *prop = opaque;
CharDriverState **ptr = qdev_get_prop_ptr(dev, prop);
CharDriverState *chr = *ptr;

if (chr) {
qemu_chr_add_handlers(chr, NULL, NULL, NULL, NULL);
qemu_chr_fe_release(chr);
}
}

So doing the qemu_chr_add_handlers(s->cs, NULL, NULL, NULL, NULL); from
the usb handle_destroy function too will lead to it being done twice.

Signed-off-by: Hans de Goede <>
Signed-off-by: Gerd Hoffmann <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences