mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
drm/amd/display: added NULL check at start of dc_validate_stream
[Why] prevent invalid memory access [How] check if dc and stream are NULL Co-authored-by: winstang <winstang@amd.com> Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com> Signed-off-by: winstang <winstang@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
ec14eab37d
commit
26c56049cc
|
|
@ -4754,6 +4754,9 @@ void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream,
|
|||
|
||||
enum dc_status dc_validate_stream(struct dc *dc, struct dc_stream_state *stream)
|
||||
{
|
||||
if (dc == NULL || stream == NULL)
|
||||
return DC_ERROR_UNEXPECTED;
|
||||
|
||||
struct dc_link *link = stream->link;
|
||||
struct timing_generator *tg = dc->res_pool->timing_generators[0];
|
||||
enum dc_status res = DC_OK;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user