]> git.baikalelectronics.ru Git - kernel.git/commit
gpu: lontium-lt9611: Fix NULL pointer dereference in lt9611_connector_init()
authorZeng Jingxiang <linuszeng@tencent.com>
Wed, 27 Jul 2022 07:31:19 +0000 (15:31 +0800)
committerRobert Foss <robert.foss@linaro.org>
Mon, 8 Aug 2022 09:22:14 +0000 (11:22 +0200)
commit9450a53ff48b727f389187ad4a6b15c6f47c15f2
tree318c2b45e3bbf4a357039616c88a2259a58117cc
parent4becbff6d99f2a93dc725f195d331441a512bbf2
gpu: lontium-lt9611: Fix NULL pointer dereference in lt9611_connector_init()

A NULL check for bridge->encoder shows that it may be NULL, but it
already been dereferenced on all paths leading to the check.
812 if (!bridge->encoder) {

Dereference the pointer bridge->encoder.
810 drm_connector_attach_encoder(&lt9611->connector, bridge->encoder);

Signed-off-by: Zeng Jingxiang <linuszeng@tencent.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220727073119.1578972-1-zengjx95@gmail.com
drivers/gpu/drm/bridge/lontium-lt9611.c