Commit 058acb33 authored by Xie Yongji's avatar Xie Yongji Committed by Gerd Hoffmann

drm/virtio: free virtqueues on probe failure

We should call virtio_gpu_deinit() to free virtqueues when
drm_dev_register() failed.
Signed-off-by: default avatarXie Yongji <xieyongji@bytedance.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210517084913.403-3-xieyongji@bytedance.comSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent cec7f177
......@@ -125,11 +125,13 @@ static int virtio_gpu_probe(struct virtio_device *vdev)
ret = drm_dev_register(dev, 0);
if (ret)
goto err_free;
goto err_deinit;
drm_fbdev_generic_setup(vdev->priv, 32);
return 0;
err_deinit:
virtio_gpu_deinit(dev);
err_free:
drm_dev_put(dev);
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment