diff options
author | Wyatt Wood <wyatt.wood@amd.com> | 2019-07-31 22:52:46 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-08-23 19:37:47 +0300 |
commit | ddef02de0d71d483ad4398393717cc0d53fc990a (patch) | |
tree | e1b5bbeec9ef38ad96c8f9e813124336847a0216 /drivers/gpu/drm | |
parent | 43d4baab525dc85f93d1e470a1b6e8ea1b0a5fdd (diff) | |
download | linux-ddef02de0d71d483ad4398393717cc0d53fc990a.tar.xz |
drm/amd/display: add null checks before logging
Adding NULL checks to various parameters in log_tf, to avoid
nullptr errors
Signed-off-by: Wyatt Wood <wyatt.wood@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Nikola Cornij <Nikola.Cornij@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/dcn10/dcn10_hw_sequencer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c index f61f59ac1e00..51c4c62b40e1 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c @@ -1503,9 +1503,12 @@ dcn10_set_output_transfer_func(struct pipe_ctx *pipe_ctx, } else dpp->funcs->dpp_program_regamma_pwl(dpp, NULL, OPP_REGAMMA_BYPASS); - log_tf(stream->ctx, - stream->out_transfer_func, - dpp->regamma_params.hw_points_num); + if (stream != NULL && stream->ctx != NULL && + stream->out_transfer_func != NULL) { + log_tf(stream->ctx, + stream->out_transfer_func, + dpp->regamma_params.hw_points_num); + } return true; } |