diff options
Diffstat (limited to 'backends/msmouse.c')
-rw-r--r-- | backends/msmouse.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/msmouse.c b/backends/msmouse.c index 0126fa0b13..476dab5634 100644 --- a/backends/msmouse.c +++ b/backends/msmouse.c @@ -68,9 +68,13 @@ static CharDriverState *qemu_chr_open_msmouse(const char *id, ChardevReturn *ret, Error **errp) { + ChardevCommon *common = qapi_ChardevDummy_base(backend->u.msmouse); CharDriverState *chr; - chr = qemu_chr_alloc(); + chr = qemu_chr_alloc(common, errp); + if (!chr) { + return NULL; + } chr->chr_write = msmouse_chr_write; chr->chr_close = msmouse_chr_close; chr->explicit_be_open = true; |