]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtio: Fix NULL vs IS_ERR checking in virtio_gpu_object_shmem_init
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 2 Jun 2022 10:42:22 +0000 (14:42 +0400)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 9 Jun 2022 05:30:13 +0000 (07:30 +0200)
commit00f2057fb9b1ed189e51c8704920973d5260a77b
tree06ba6a8559e0a0f51c3ea60da4bdc30ff1ee3ec0
parentbf8c75dc56cd146e9e42a2e524d3b87a4f7ce31e
drm/virtio: Fix NULL vs IS_ERR checking in virtio_gpu_object_shmem_init

Since drm_prime_pages_to_sg() function return error pointers.
The drm_gem_shmem_get_sg_table() function returns error pointers too.
Using IS_ERR() to check the return value to fix this.

Fixes: e09df06efbe1 ("drm/virtio: move virtio_gpu_mem_entry initialization to new function")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220602104223.54527-1-linmq006@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_object.c