uninitialized variable in dcn10 code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Harry,

At display/dc/dcn10/dcn10_hw_sequencer.c:2140

	if (num_planes > 0) {
		struct dc_stream_state *stream_for_cursor;

		program_all_pipe_in_tree(dc, top_pipe_to_program, context);

		for (i = 0; i < dc->res_pool->pipe_count; i++) {
			struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];

			if (stream == pipe_ctx->stream) {
				stream_for_cursor = pipe_ctx->stream;
				break;
			}
		}

		/* TODO: this is a hack w/a for switching from mpo to pipe split */
		if (stream_for_cursor->cursor_attributes.address.quad_part != 0) {
			struct dc_cursor_position position = { 0 };

			dc_stream_set_cursor_position(stream_for_cursor, &position);
			dc_stream_set_cursor_attributes(stream_for_cursor,
				&stream_for_cursor->cursor_attributes);
		}
	}

The variable "stream_for_cursor" could be used uninitialized in the TODO 
block.  The pointer should be probably initialized to NULL at the top.

Cheers,
Tom


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux