[PATCH v3 1/1] drm/bridge: lt8912b: Fix issues found during static analysis

Dan Carpenter dan.carpenter at oracle.com
Wed Mar 31 11:35:54 UTC 2021


On Wed, Mar 31, 2021 at 01:21:37PM +0200, Adrien Grassein wrote:
> -	lt->data_lanes = of_property_count_u32_elems(endpoint, "data-lanes");
> +	data_lanes = of_property_count_u32_elems(endpoint, "data-lanes");
>  	of_node_put(endpoint);
> +	if (data_lanes < 0) {
> +		dev_err(lt->dev, "%s: Bad data-lanes property\n", __func__);
> +		return lt->data_lanes;

This needs to be "return data_lanes;"

> +	}
> +	lt->data_lanes = data_lanes;

I really believe that v4 will be the perfect version though...  :)

regards,
dan carpenter



More information about the dri-devel mailing list