diff options
author | Shirish S <shirish.s@amd.com> | 2017-10-26 11:47:42 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-02 13:00:58 -0400 |
commit | 55d9038b0c680ec90e3a7d2440e717ac6a2a8064 (patch) | |
tree | bd73aeab97b1ca5dd274be056b584d50ad56a226 /drivers/gpu/drm | |
parent | f5ba60fefa00ca789c4eb35df38b171d532b3155 (diff) | |
download | linux-55d9038b0c680ec90e3a7d2440e717ac6a2a8064.tar.bz2 |
drm/amd/display: fix null pointer dereference
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c index 5cf69af9693d..572b885195c7 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c @@ -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, ¶m); if (mi != NULL && mi->funcs->set_cursor_position != NULL) |