Commit cf7b3e5b authored by Zeng Jingxiang's avatar Zeng Jingxiang Committed by Jialin Zhang
Browse files

gpu: lontium-lt9611: Fix NULL pointer dereference in lt9611_connector_init()

stable inclusion
from stable-v5.10.150
commit 3959e8faf8bf6bea619e8856c736db64e6eced37
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0XA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3959e8faf8bf6bea619e8856c736db64e6eced37



--------------------------------

[ Upstream commit ef8886f3 ]

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: default avatarZeng Jingxiang <linuszeng@tencent.com>
Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220727073119.1578972-1-zengjx95@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent 7734c60a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment