mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
drm/amd/display: Add NULL check within get_target_mpc_factor
[Why] Coverity reports NULL_RETURN warning. [How] Add pointer NULL check. Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Hersen Wu <hersenxs.wu@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
67a4888dc3
commit
c6bce984b8
|
|
@ -819,7 +819,16 @@ static unsigned int get_target_mpc_factor(struct dml2_context *ctx,
|
|||
|
||||
/* get stream id of main stream */
|
||||
main_stream = ctx->config.svp_pstate.callbacks.get_paired_subvp_stream(state, stream);
|
||||
if (!main_stream) {
|
||||
ASSERT(false);
|
||||
return 1;
|
||||
}
|
||||
|
||||
main_stream_status = ctx->config.callbacks.get_stream_status(state, main_stream);
|
||||
if (!main_stream_status) {
|
||||
ASSERT(false);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* get plane id for associated main plane */
|
||||
get_plane_id(ctx, state, main_stream_status->plane_states[plane_idx],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user