summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-01-22 03:16:44 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-01-22 03:16:44 +0000
commit0bf76fc2775d3db952bd26ad51744b28eab0d6cf (patch)
tree9cba1791489f4ccd80a24684651980ed7bbe1863 /sys
parentaa10f78d156f18a5b8cd07b6501b2d1b5d3b7d5c (diff)
drm/crtc: fix uninitialized variable use
From Jani Nikula 7e881af7fb3c2ddc0c29b249250606fbe004f353 in linux-6.6.y/6.6.13 6e455f5dcdd15fa28edf0ffb5b44d3508512dccf in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/drm_crtc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drm_crtc.c b/sys/dev/pci/drm/drm_crtc.c
index d45638a1f5f..ee349e64a50 100644
--- a/sys/dev/pci/drm/drm_crtc.c
+++ b/sys/dev/pci/drm/drm_crtc.c
@@ -715,7 +715,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
struct drm_mode_set set;
uint32_t __user *set_connectors_ptr;
struct drm_modeset_acquire_ctx ctx;
- int ret, i, num_connectors;
+ int ret, i, num_connectors = 0;
if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EOPNOTSUPP;
@@ -850,7 +850,6 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
goto out;
}
- num_connectors = 0;
for (i = 0; i < crtc_req->count_connectors; i++) {
connector_set[i] = NULL;
set_connectors_ptr = (uint32_t __user *)(unsigned long)crtc_req->set_connectors_ptr;