]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drm/amd/display: fix null pointer dereference
authorShirish S <shirish.s@amd.com>
Thu, 26 Oct 2017 06:17:42 +0000 (11:47 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 Nov 2017 17:00:58 +0000 (13:00 -0400)
While setting cursor position in case of mpo,
input_pixel_processor is not available for underlay,
hence add check of the same to avoid null pointer
access issue.

Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_stream.c

index 5cf69af9693d242cb8e9b52787bc614f78c6abe6..572b885195c755b02fdbabf89f7bc0302b46e72f 100644 (file)
@@ -288,7 +288,7 @@ bool dc_stream_set_cursor_position(
                        pos_cpy.enable = false;
 
 
-               if (ipp->funcs->ipp_cursor_set_position != NULL)
+               if (ipp !=NULL && ipp->funcs->ipp_cursor_set_position != NULL)
                        ipp->funcs->ipp_cursor_set_position(ipp, &pos_cpy, &param);
 
                if (mi != NULL && mi->funcs->set_cursor_position != NULL)