diff options
author | Gurchetan Singh <gurchetansingh@chromium.org> | 2020-09-02 14:08:26 -0700 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-09-09 08:54:20 +0200 |
commit | 1fb97413a3f754f28e24a136a49107e81e12f3fd (patch) | |
tree | a167e6f638e21d8ac88dbf12a641d40d1bc9adf7 /drivers/gpu/drm/virtio/virtgpu_kms.c | |
parent | e219688fc5c3d0d9136f8d29d7e0498388f01440 (diff) | |
download | linux-1fb97413a3f754f28e24a136a49107e81e12f3fd.tar.bz2 |
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: Gurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200902210847.2689-3-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_kms.c')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_kms.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 5ba389e0a02f..06af537b0091 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -105,7 +105,7 @@ int virtio_gpu_init(struct drm_device *dev) /* this will expand later */ struct virtqueue *vqs[2]; u32 num_scanouts, num_capsets; - int ret; + int ret = 0; if (!virtio_has_feature(dev_to_virtio(dev->dev), VIRTIO_F_VERSION_1)) return -ENODEV; |