From: Jyri Sarha <jsarha@ti.com>
To: dri-devel@lists.freedesktop.org
Cc: tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com,
bcousson@baylibre.com
Subject: Re: [PATCH 5/5] drm/tilcdc: Avoid error print by of_graph_get_next_endpoint()
Date: Tue, 14 Jun 2016 14:50:42 +0300 [thread overview]
Message-ID: <575FEF92.1050902@ti.com> (raw)
In-Reply-To: <0b14cf85677390cab5cd287a9d8c93e67874afa3.1465904170.git.jsarha@ti.com>
On 06/14/16 14:45, Jyri Sarha wrote:
> Avoid error print by of_graph_get_next_endpoint() if there is no ports
> present.
>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
> drivers/gpu/drm/tilcdc/tilcdc_external.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/tilcdc/tilcdc_external.c
> index 03acb4f..51811e3 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_external.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c
> @@ -138,9 +138,20 @@ static int dev_match_of(struct device *dev, void *data)
> int tilcdc_get_external_components(struct device *dev,
> struct component_match **match)
> {
> + struct device_node *node;
> struct device_node *ep = NULL;
> int count = 0;
>
> + /* Avoid error print by of_graph_get_next_endpoint() if there
> + * is no ports present.
> + */
> + node = of_get_child_by_name(dev->of_node, "ports");
> + if (!node)
> + node = of_get_child_by_name(dev->of_node, "port");
> + if (!node)
> + return 0;
> + of_node_put(node);
> +
> while ((ep = of_graph_get_next_endpoint(dev->of_node, ep))) {
> struct device_node *node;
^^^^
Argh.. This now redundant local variable should have been removed. It is
now done in my local branch and will be in the v2 series, if there is
need for one.
BR,
Jyri
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2016-06-14 11:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 11:45 [PATCH 0/5] drm/tilcdc Fixes and cleanups Jyri Sarha
2016-06-14 11:45 ` [PATCH 1/5] drm/tilcdc: Restore old dmps state in pm_resume() Jyri Sarha
2016-06-14 11:48 ` Tomi Valkeinen
2016-06-14 16:22 ` Daniel Vetter
2016-06-14 11:45 ` [PATCH 2/5] drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ function Jyri Sarha
2016-06-14 11:45 ` [PATCH 3/5] drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop() Jyri Sarha
2016-06-14 16:24 ` Daniel Vetter
2016-06-14 11:45 ` [PATCH 4/5] drm/tilcdc: Refer to panel.txt and tfp410.txt bindings in tilcdc.txt Jyri Sarha
2016-06-14 11:45 ` [PATCH 5/5] drm/tilcdc: Avoid error print by of_graph_get_next_endpoint() Jyri Sarha
2016-06-14 11:50 ` Jyri Sarha [this message]
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=575FEF92.1050902@ti.com \
--to=jsarha@ti.com \
--cc=bcousson@baylibre.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=tomi.valkeinen@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.