]> Git Repo - linux.git/commitdiff
drm/virtio: fix uninitialized variable
authorGurchetan Singh <[email protected]>
Wed, 2 Sep 2020 21:08:26 +0000 (14:08 -0700)
committerGerd Hoffmann <[email protected]>
Wed, 9 Sep 2020 06:54:20 +0000 (08:54 +0200)
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 <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
drivers/gpu/drm/virtio/virtgpu_kms.c

index 5ba389e0a02fb1d3eed6a3ded210f35e8b41714d..06af537b0091d27814a5871bc22dbde292c9e50f 100644 (file)
@@ -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;
This page took 0.051587 seconds and 4 git commands to generate.