summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-02-03 12:54:24 +0300
committerGerd Hoffmann <kraxel@redhat.com>2021-02-03 16:52:44 +0300
commiteb988a2ee500d3297a1de048dc3c77b6c354e650 (patch)
tree69157d54d242aa86d06f083919d6e80e4b4d7007 /drivers
parent5823cca39d585e4b4a32b1292eed0015da9c3276 (diff)
downloadlinux-eb988a2ee500d3297a1de048dc3c77b6c354e650.tar.xz
drm/virtio: fix an error code in virtio_gpu_init()
If devm_request_mem_region() fails this code currently returns success but it should return -EBUSY. Fixes: 6076a9711dc5 ("drm/virtio: implement blob resources: probe for host visible region") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: http://patchwork.freedesktop.org/patch/msgid/YBpy0GS7GfmafMfe@mwanda Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_kms.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c
index b4ec479c32cd..b375394193be 100644
--- a/drivers/gpu/drm/virtio/virtgpu_kms.c
+++ b/drivers/gpu/drm/virtio/virtgpu_kms.c
@@ -163,6 +163,7 @@ int virtio_gpu_init(struct drm_device *dev)
vgdev->host_visible_region.len,
dev_name(&vgdev->vdev->dev))) {
DRM_ERROR("Could not reserve host visible region\n");
+ ret = -EBUSY;
goto err_vqs;
}