Commit f12d5f51 authored by Natalia Petrova's avatar Natalia Petrova Committed by sanglipeng
Browse files

drm/nouveau: add nv_encoder pointer check for NULL

stable inclusion
from stable-v5.10.185
commit 6ab91d1adb5a57d7380e902ff3b89564f138c4e7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8L5XP

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



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

[ Upstream commit 55b94bb8 ]

Pointer nv_encoder could be dereferenced at nouveau_connector.c
in case it's equal to NULL by jumping to goto label.
This patch adds a NULL-check to avoid it.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 3195c5f9 ("drm/nouveau: set encoder for lvds")
Signed-off-by: default avatarNatalia Petrova <n.petrova@fintech.ru>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
[Fixed patch title]
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230512103320.82234-1-n.petrova@fintech.ru


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent e0ad1684
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment