[PATCH v2] drm/meson: fix possible object reference leak

Markus Elfring Markus.Elfring at web.de
Mon Apr 8 09:13:04 UTC 2019


> v2->v1: convert a if statement into a ternary statement.

Would you like to omit the arrow in such version information?


> @@ -720,15 +720,10 @@ static bool meson_hdmi_connector_is_available(struct device *dev)
>
>  	/* If the endpoint node exists, consider it enabled */
>  	remote = of_graph_get_remote_port(ep);
> -	if (remote) {
> -		of_node_put(ep);
> -		return true;
> -	}
> -
>  	of_node_put(ep);
>  	of_node_put(remote);

Can a reordering of the passed variables be useful for such function calls?

+  	of_node_put(remote);
+  	of_node_put(ep);

Regards,
Markus


More information about the dri-devel mailing list