From: Dan Carpenter <dan.carpenter@oracle.com>
To: jsarha@ti.com
Cc: dri-devel@lists.freedesktop.org
Subject: [bug report] drm/bridge: Add ti-tfp410 DVI transmitter driver
Date: Tue, 6 Dec 2016 16:28:26 +0300 [thread overview]
Message-ID: <20161206132826.GA18883@elgon.mountain> (raw)
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@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;"?
146
147 dvi->ddc = of_get_i2c_adapter_by_node(ddc_phandle);
148 if (dvi->ddc)
149 dev_info(dvi->dev, "Connector's ddc i2c bus found\n");
150 else
151 ret = -EPROBE_DEFER;
152
153 fail:
154 of_node_put(ep);
155 of_node_put(connector_node);
156 of_node_put(ddc_phandle);
157 return ret;
158 }
regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2016-12-06 13:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 13:28 Dan Carpenter [this message]
2016-12-07 14:20 ` [bug report] drm/bridge: Add ti-tfp410 DVI transmitter driver Jyri Sarha
2016-12-07 14:46 ` Daniel Vetter
2016-12-07 20:28 ` Jyri Sarha
2016-12-07 22:29 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161206132826.GA18883@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox