]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtio: remove incorrect ENOSPC check
authorChia-I Wu <olvaffe@gmail.com>
Wed, 5 Feb 2020 18:19:46 +0000 (10:19 -0800)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 6 Feb 2020 10:55:08 +0000 (11:55 +0100)
commitcf5670ccd0080267e2a912c837a0ee136ef66427
tree8b45c721edb8e25213a782f7e25ee77de09907f8
parent3fd03fdf7017dead515721db0b5ac7a7b9fa0845
drm/virtio: remove incorrect ENOSPC check

The handling of virtqueue_add_sgs ENOSPC error is incorrect because
it can result in out-of-order virtqueue_add_sgs and break fences.
We never get ENOSPC anyway because the caller waits until there is
enough space (the other caller that did not wait was removed in
commit 0304de8605e6 ("drm/virtio: Rewrite virtio_gpu_queue_ctrl_buffer
using fenced version.")).  Remove the incorrect and unnecessary error
path.

This also adds a WARN_ON(ret) until we properly handle errors.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Cc: David Riley <davidriley@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-3-olvaffe@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_vq.c