Commit 389c6b3e authored by Charlene Liu's avatar Charlene Liu Committed by Alex Deucher
Browse files

drm/amd/display: add NULL pointer check



[why]
check dmub_Srv exist or not before accessing dmub.

Acked-by: default avatarStylon Wang <stylon.wang@amd.com>
Signed-off-by: default avatarCharlene Liu <charlene.liu@amd.com>
Reviewed-by: default avatarZhan Liu <Zhan.Liu@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3ffb1939
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ static void program_cursor_attributes(
		}

		dc->hwss.set_cursor_attribute(pipe_ctx);

		if (dc->ctx->dmub_srv)
			dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
		if (dc->hwss.set_cursor_sdr_white_level)
			dc->hwss.set_cursor_sdr_white_level(pipe_ctx);
@@ -396,7 +396,7 @@ static void program_cursor_position(
		}

		dc->hwss.set_cursor_position(pipe_ctx);

		if (dc->ctx->dmub_srv)
			dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
	}