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

wen.yang99 at zte.com.cn wen.yang99 at zte.com.cn
Mon Apr 8 10:25:05 UTC 2019


> > v2->v1: convert a if statement into a ternary statement.
> 
> Would you like to omit the arrow in such version information?

Thank you for your comments
The information about the previous versions goes below the ---, 
and only the reviewers can see it.
It does not appear in the git log log.
Thanks.

> > @@ -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);
> 

Thank you.
But considering the multiprocessor concurrent execution, 
the reverse of the order of these two statements may not have additional benefits.
The previous code implementation also maintains this order, 
and we will keep the original order unless we can prove that the reverse order can indeed bring real benefits.

--
Regards,
Wen


More information about the dri-devel mailing list