Paolo Bonzini <pbonz...@redhat.com> wrote:
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  hw/pc.c      |    7 +++----
>  hw/pc.h      |    1 -
>  hw/pckbd.c   |    7 +++++--
>  hw/vmmouse.c |   11 +++--------
>  4 files changed, 11 insertions(+), 15 deletions(-)
>
> diff --git a/hw/pc.c b/hw/pc.c
> index 7f3aa65..76787c7 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -1181,13 +1181,12 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq 
> *gsi,
>      if (!no_vmport) {
>          vmport_init(isa_bus);
>          vmmouse = isa_try_create(isa_bus, "vmmouse");
> +        qdev_init_nofail(&vmmouse->qdev);
> +        qdev_connect_gpio_out(DEVICE(vmmouse), 0,
> +                              qdev_get_gpio_in(DEVICE(i8042), 0));

Are you sue that vmmouse is always non-NULL?  My understanding is that
all callers check if is_try_create() return NULL.

Could you clarify?

Thanks, Juan.

Reply via email to