drm/amd/display: add pp_smu NULL pointer check

add pp_smu NULL ptr check

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Charlene Liu 2018-09-07 13:31:34 -04:00 committed by Alex Deucher
parent a978f65765
commit 5aa9935b65

View file

@ -1395,7 +1395,7 @@ static void notify_display_count_to_smu(
* sent as part of pplib_apply_display_requirements.
* So just return.
*/
if (!pp_smu->set_display_count)
if (!pp_smu || !pp_smu->set_display_count)
return;
display_count = 0;