]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtio: Handle error from virtio_gpu_resource_id_get
authorMatthew Wilcox <willy@infradead.org>
Tue, 30 Oct 2018 16:53:51 +0000 (09:53 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 14 Nov 2018 11:50:34 +0000 (12:50 +0100)
commit1bd46efc43fb19791ffd0933d144d61a8f6d48e0
tree7e954dcef435d0b5b8a1128b81f92cd03f35b597
parent3036aec962cba351df35516d189df45c0a0f03b6
drm/virtio: Handle error from virtio_gpu_resource_id_get

ida_alloc() can return -ENOMEM in the highly unlikely case we run out
of memory.  The current code creates an object with an invalid ID.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20181030165352.13065-1-willy@infradead.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_object.c