[PATCH v2 02/23] drm/virtio: fix uninitialized variable
Gurchetan Singh
gurchetansingh at chromium.org
Wed Sep 2 21:08:26 UTC 2020
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 at chromium.org>
---
drivers/gpu/drm/virtio/virtgpu_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c
index 5ba389e0a02fb..06af537b0091d 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;
--
2.26.2
More information about the dri-devel
mailing list