Revert "drm/virtio: Fix NULL vs IS_ERR checking in virtio_gpu_object_shmem_init"

This reverts commit 72893aadc0 which is
commit c24968734abfed81c8f93dc5f44a7b7a9aecadfa upstream.

It is needed to be reverted so we can drop a larger ABI-breaking commit.
It will be brought back again in a later commit.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2505a5474baa478bf44b0f5eb4799ba90132113c
This commit is contained in:
Greg Kroah-Hartman
2022-08-22 15:19:58 +02:00
parent 8fd5b33ea5
commit d8754809ba

View File

@@ -167,9 +167,9 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev,
* since virtio_gpu doesn't support dma-buf import from other devices.
*/
shmem->pages = drm_gem_shmem_get_sg_table(&bo->base);
if (IS_ERR(shmem->pages)) {
if (!shmem->pages) {
drm_gem_shmem_unpin(&bo->base);
return PTR_ERR(shmem->pages);
return -EINVAL;
}
if (use_dma_api) {