spice: fix coverity complains

Remove the unnecessary NULL check.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1463047028-123868-3-git-send-email-arei.gonglei@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gonglei 2016-05-12 17:57:08 +08:00 committed by Gerd Hoffmann
parent f454f49c42
commit 28f4a7083d

View file

@ -774,9 +774,7 @@ static void display_mouse_define(DisplayChangeListener *dcl,
SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
qemu_mutex_lock(&ssd->lock);
if (c) {
cursor_get(c);
}
cursor_get(c);
cursor_put(ssd->cursor);
ssd->cursor = c;
ssd->hot_x = c->hot_x;