usb-serial: Remove double call to qemu_chr_add_handlers( NULL )
commit7598b41cfa13b2469b9411eee237a5c551e0ffaf
authorHans de Goede <hdegoede@redhat.com>
Fri, 5 Apr 2013 09:30:25 +0000 (5 11:30 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 16 Apr 2013 09:59:08 +0000 (16 11:59 +0200)
tree06830aa9d8da956e98f8d34882b69b63b4a3bc72
parent24a6e7f4d91e9ed5f8117ecb083431a23f8609a0
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(obj);
    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 <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-serial.c