From: Charlene Liu <[email protected]>

add pp_smu NULL ptr check

Change-Id: Ib810078b1f4ea29d48e197539f3c24bfe7085b75
Signed-off-by: Charlene Liu <[email protected]>
Reviewed-by: Dmytro Laktyushkin <[email protected]>
Acked-by: Bhawanpreet Lakha <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 7d9be87140cc..61bb3d52641c 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -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;
-- 
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to