Jani Nikula 9d588f3b6f drm/crtc: fix uninitialized variable use
[ Upstream commit 6e455f5dcdd15fa28edf0ffb5b44d3508512dccf ]

Commit 3823119b9c2b ("drm/crtc: Fix uninit-value bug in
drm_mode_setcrtc") was supposed to fix use of an uninitialized variable,
but introduced another.

num_connectors is only initialized if crtc_req->count_connectors > 0,
but it's used regardless. Fix it.

Fixes: 3823119b9c2b ("drm/crtc: Fix uninit-value bug in drm_mode_setcrtc")
Cc: syzbot+4fad2e57beb6397ab2fc@syzkaller.appspotmail.com
Cc: Ziqi Zhao <astrajoan@yahoo.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231208131238.2924571-1-jani.nikula@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-20 11:50:09 +01:00
..
2023-09-19 12:27:56 +02:00
2023-03-10 09:34:33 +01:00
2022-10-05 11:24:12 -07:00
2022-08-16 12:46:26 +02:00
2023-11-28 17:07:03 +00:00
2023-08-30 16:10:57 +02:00
2022-09-20 09:37:12 +02:00
2022-08-26 14:22:59 +02:00
2023-08-30 16:10:57 +02:00
2023-05-11 23:03:07 +09:00
2022-07-13 10:54:56 +10:00
2022-06-28 07:56:32 +02:00
2022-09-06 10:56:04 +02:00
2023-05-30 14:03:20 +01:00
2023-02-22 12:59:46 +01:00
2022-10-07 17:04:10 -07:00