提交 e8092522 编写于 作者: D Dan Carpenter 提交者: Zheng Zengkai

drm/bridge: display-connector: fix an uninitialized pointer in probe()

stable inclusion
from stable-v5.10.94
commit 7798757013ec45e65656bafdb444eb4e675578d9
bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9

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

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

[ Upstream commit 189723fb ]

The "label" pointer is used for debug output.  The code assumes that it
is either NULL or valid, but it is never set to NULL.  It is either
valid or uninitialized.

Fixes: 0c275c30 ("drm/bridge: Add bridge driver for display connectors")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211013080825.GE6010@kiliSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 9ea8d781
......@@ -104,7 +104,7 @@ static int display_connector_probe(struct platform_device *pdev)
{
struct display_connector *conn;
unsigned int type;
const char *label;
const char *label = NULL;
int ret;
conn = devm_kzalloc(&pdev->dev, sizeof(*conn), GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册