drm/gma500: Checking a get_config_mode() call in mdfld_dsi_output_init()

Markus Elfring Markus.Elfring at web.de
Sun Oct 20 08:20:26 UTC 2019


I tried another script for the semantic patch language out.
This source code analysis approach points a call of the member
function “get_config_mode” out for further considerations
according to the implementation of the function “mdfld_dsi_output_init”.

	dsi_config->fixed_mode = p_vid_funcs->get_config_mode(dev);
	if (p_vid_funcs->get_panel_info(dev, pipe, &dsi_panel_info))
			goto dsi_init_err0;
	dsi_config->mode = dsi_config->fixed_mode;
	if (!dsi_config->fixed_mode) {
		DRM_ERROR("No pannel fixed mode was found\n");
		goto dsi_init_err0;

How do you think about to move the condition check for the data structure
member “fixed_mode” directly after the corresponding assignment?
Can it be helpful to reorder these statements a bit?


More information about the dri-devel mailing list