Re: [PATCH v3 3/3] drm/panel-simple: allow LVDS format override

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

 



On Fri, Jul 28, 2023 at 01:54:40PM +0200, Johannes Zink wrote:
> @@ -556,7 +602,7 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
>  	struct device_node *ddc;
>  	int connector_type;
>  	u32 bus_flags;
> -	int err;
> +	int err, ret;

I don't like this at all...

>  
>  	panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
>  	if (!panel)
> @@ -601,6 +647,13 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
>  			panel_simple_parse_panel_timing_node(dev, panel, &dt);
>  	}
>  
> +	if (desc->connector_type == DRM_MODE_CONNECTOR_LVDS) {
> +		/* Optional data-mapping property for overriding bus format */
> +		ret = panel_simple_override_nondefault_lvds_datamapping(dev, panel);
> +		if (ret)
> +			goto free_ddc;

This *looks* like we are returning an error but we aren't.  I think we
should be.  If not then we need to have a discussion about that and
add some comments.

regards,
dan carpenter

> +	}
> +
>  	connector_type = desc->connector_type;
>  	/* Catch common mistakes for panels. */
>  	switch (connector_type) {
> 
> -- 
> 2.39.2



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux