]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix a potential null pointer dereference
authorColin Ian King <colin.king@canonical.com>
Fri, 16 Aug 2019 22:10:11 +0000 (23:10 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 22 Aug 2019 22:25:33 +0000 (17:25 -0500)
commit7fc08c7bf815a7af350fde18f3f9b7bbb528e900
tree0ef4e8d6a3df1d9ed955dcbd5c01c308bacb28bf
parent26914cb0248de91c5423e65bd13bc4d8ebd65aa5
drm/amd/display: fix a potential null pointer dereference

Currently the pointer init_data is dereferenced on the assignment
of fw_info before init_data is sanity checked to see if it is null.
Fix te potential null pointer dereference on init_data by only
performing dereference after it is null checked.

Addresses-Coverity: ("Dereference before null check")
Fixes: 82d0f62d0571 ("drm/amd/display: make firmware info only load once during dc_bios create")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c