drm/virtio: Handle context ID allocation errors

It is possible to run out of memory while allocating IDs.  The current
code would create a context with an invalid ID; change it to return
-ENOMEM to userspace.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20180926160031.15721-3-willy@infradead.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Matthew Wilcox 2018-09-26 09:00:29 -07:00 • committed by Gerd Hoffmann
commit 6a37c49a94