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

From: Markus Elfring
Date: Mon Apr 08 2019 - 05:13:19 EST


> 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