]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: anx7625: Zero error variable when panel bridge not present
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Mon, 13 Jun 2022 16:37:05 +0000 (12:37 -0400)
committerRobert Foss <robert.foss@linaro.org>
Wed, 15 Jun 2022 16:03:44 +0000 (18:03 +0200)
commit5844808464c82f503abcfaabc3b7286fdb265f6b
tree2d003616fcd90ffdcb2bc2669bb36072bbb6a39f
parent9d5b078a065d7ec6482bb561df14d2214618ac30
drm/bridge: anx7625: Zero error variable when panel bridge not present

While parsing the DT, the anx7625 driver checks for the presence of a
panel bridge on endpoint 1. If it is missing, pdata->panel_bridge stores
the error pointer and the function returns successfully without first
cleaning that variable. This is an issue since other functions later
check for the presence of a panel bridge by testing the trueness of that
variable.

In order to ensure proper behavior, zero out pdata->panel_bridge before
returning when no panel bridge is found.

Fixes: 11180e59c868 ("drm/bridge: anx7625: switch to devm_drm_of_get_bridge")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220613163705.1531721-1-nfraprado@collabora.com
drivers/gpu/drm/bridge/analogix/anx7625.c