]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/bridge: Avoid uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 4 Jul 2022 10:55:40 +0000 (13:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:57:17 +0000 (09:57 +0200)
commit3051f34c01935d14f09f7d0c7fb1cd568d6e3e81
tree6c5c20d5da07760d4904af69aa001648e650508f
parent4d4d5bc659206b187263190ad9a03513f625659d
drm/bridge: Avoid uninitialized variable warning

[ Upstream commit 7d1202738efda60155d98b370b3c70d336be0eea ]

This code works, but technically it uses "num_in_bus_fmts" before it
has been initialized so it leads to static checker warnings and probably
KMEMsan warnings at run time.  Initialize the variable to zero to
silence the warning.

Fixes: f32df58acc68 ("drm/bridge: Add the necessary bits to support bus format negotiation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/YrrIs3hoGcPVmXc5@kili
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/drm_bridge.c