]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix a potential NULL dereference
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Jan 2021 08:45:08 +0000 (11:45 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 25 Jan 2021 22:48:02 +0000 (17:48 -0500)
commit93b11217cb0b48345aafe041e6a9dbd2841aaf5c
tree62c686945a6cc721ab4152607052cdddefd333ef
parent6bb7e74639589a61eae922d851cbea4265953b24
drm/amd/display: Fix a potential NULL dereference

The debug printk dereferences "link->link_enc" before we have ensured
that it is non-NULL.  Fix this potential NULL derefence by moving the
printk after the check.

Fixes: 73747150759d60 ("drm/amd/display: Log link/connector info provided in BIOS object table")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c