Commit 1fb97413 authored by Gurchetan Singh's avatar Gurchetan Singh Committed by Gerd Hoffmann

drm/virtio: fix uninitialized variable

smatch reported this with the blob series:

drivers/gpu/drm/virtio/virtgpu_kms.c:227 virtio_gpu_init()
error: uninitialized symbol 'ret'.
Signed-off-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200902210847.2689-3-gurchetansingh@chromium.orgSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent e219688f
...@@ -105,7 +105,7 @@ int virtio_gpu_init(struct drm_device *dev) ...@@ -105,7 +105,7 @@ int virtio_gpu_init(struct drm_device *dev)
/* this will expand later */ /* this will expand later */
struct virtqueue *vqs[2]; struct virtqueue *vqs[2];
u32 num_scanouts, num_capsets; u32 num_scanouts, num_capsets;
int ret; int ret = 0;
if (!virtio_has_feature(dev_to_virtio(dev->dev), VIRTIO_F_VERSION_1)) if (!virtio_has_feature(dev_to_virtio(dev->dev), VIRTIO_F_VERSION_1))
return -ENODEV; return -ENODEV;
......
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