drm/bridge: tc358768: Fix use of uninitialized variable
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 6 Sep 2023 06:50:49 +0000 (09:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:09 +0000 (11:59 +0100)
commit6bec5b0b70ddb53b03507a9bb1bc206c3e65708e
treec92e9d287e0534ec250f876eb5eed14da5fd9ab1
parentde4c5bacca4f50233f1f791bec9eeb4dee1b14cd
drm/bridge: tc358768: Fix use of uninitialized variable

[ Upstream commit a2d9036615f0adfa5b0a46bb2ce42ef1d9a04fbe ]

smatch reports:

drivers/gpu/drm/bridge/tc358768.c:223 tc358768_update_bits() error: uninitialized symbol 'orig'.

Fix this by bailing out from tc358768_update_bits() if the
tc358768_read() produces an error.

Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver")
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Tested-by: Maxim Schwalm <maxim.schwalm@gmail.com> # Asus TF700T
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230906-tc358768-v4-2-31725f008a50@ideasonboard.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/tc358768.c