[bug report] drm/bridge: Add ti-tfp410 DVI transmitter driver
Daniel Vetter
daniel at ffwll.ch
Wed Dec 7 14:46:54 UTC 2016
On Wed, Dec 07, 2016 at 04:20:34PM +0200, Jyri Sarha wrote:
> On 12/06/16 15:28, Dan Carpenter wrote:
> > Hello Jyri Sarha,
> >
> > The patch dc55ac3b52e6: "drm/bridge: Add ti-tfp410 DVI transmitter
> > driver" from Oct 31, 2016, leads to the following static checker
> > warning:
> >
> > drivers/gpu/drm/bridge/ti-tfp410.c:141 tfp410_get_connector_ddc()
> > warn: missing error code here? 'of_graph_get_remote_port_parent()' failed.
> >
> > drivers/gpu/drm/bridge/ti-tfp410.c
> > 128 static int tfp410_get_connector_ddc(struct tfp410 *dvi)
> > 129 {
> > 130 struct device_node *ep = NULL, *connector_node = NULL;
> > 131 struct device_node *ddc_phandle = NULL;
> > 132 int ret = 0;
> > 133
> > 134 /* port at 1 is the connector node */
> > 135 ep = of_graph_get_endpoint_by_regs(dvi->dev->of_node, 1, -1);
> > 136 if (!ep)
> > 137 goto fail;
> > ^^^^^^^^^
> > 138
> > 139 connector_node = of_graph_get_remote_port_parent(ep);
> > 140 if (!connector_node)
> > 141 goto fail;
> > ^^^^^^^^^
> >
> >
> > 142
> > 143 ddc_phandle = of_parse_phandle(connector_node, "ddc-i2c-bus", 0);
> > 144 if (!ddc_phandle)
> > 145 goto fail;
> > ^^^^^^^^^
> >
> > All these goto fails feel like we should be returning an error code.
> > Otherwise we could change the name to "goto success;"?
> >
>
> The label text could be seen misleading, but code runs as I intended it.
> If we can not extract the ddc i2c controller from the binding, we simply
> continue without it. The only exception is if we find the phandle but
> not the i2c controller, yet.
>
> This implementation is a hack in the first place. The code will be
> removed when DRM has a proper generic connector support.
Hm, what's this generic drm connector thing you talk about? What's it for?
Asking since I haven't seen that yet nor heard in a discussion ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list