drm/bridge: it66121: Initialize {device,vendor}_ids
authorPaul Cercueil <paul@crapouillou.net>
Fri, 27 Aug 2021 16:39:55 +0000 (17:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:22 +0000 (19:16 +0100)
commit3c1ccfcae8a962d1c11a1e4a55feb08f8733e311
treed6bce560e38e8ca89c79977e522e4567ed060bdd
parent848df133cc4274ad443a592211dcbda89ed4d8b8
drm/bridge: it66121: Initialize {device,vendor}_ids

[ Upstream commit 3a5f3d61de657bc1c2b53b77d065c5526f982e10 ]

These two arrays are populated with data read from the I2C device
through regmap_read(), and the data is then compared with hardcoded
vendor/product ID values of supported chips.

However, the return value of regmap_read() was never checked. This is
fine, as long as the two arrays are zero-initialized, so that we don't
compare the vendor/product IDs against whatever garbage is left on the
stack.

Address this issue by zero-initializing these two arrays.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver")
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210827163956.27517-1-paul@crapouillou.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/ite-it66121.c