]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/i915: Initialise outparam for error return from wait_for_register
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Sep 2020 10:50:21 +0000 (11:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:03 +0000 (08:37 +0200)
commitfff826d665f93bfb7e3e8e076a94cd5c070c2db3
tree4dc5b18d689ad598a65e8b860031cf2dc61ae6bf
parent99036f1aed7e82773904f5d91a9897bb3e507fd9
drm/i915: Initialise outparam for error return from wait_for_register

commit b79ffa914ede785a721f42d8ee3ce7b8eeede2bb upstream.

Just in case the caller passes in 0 for both slow&fast timeouts, make
sure we initialise the stack value returned. Add an assert so that we
don't make the mistake of passing 0 timeouts for the wait.

drivers/gpu/drm/i915/intel_uncore.c:2011 __intel_wait_for_register_fw() error: uninitialized symbol 'reg_value'.

References: 3f649ab728cd ("treewide: Remove uninitialized_var() usage")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200916105022.28316-1-chris@chris-wilson.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/intel_uncore.c