From: Jyri Sarha <jsarha@ti.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Valkeinen, Tomi" <tomi.valkeinen@ti.com>,
dri-devel@lists.freedesktop.org
Subject: Re: drm/tilcdc: Add support for external tda998x encoder
Date: Thu, 11 Jun 2015 22:01:42 +0300 [thread overview]
Message-ID: <5579DB16.9020808@ti.com> (raw)
In-Reply-To: <20150611151107.GC12192@mwanda>
On 06/11/15 18:11, Dan Carpenter wrote:
> Hello Jyri Sarha,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch 103cd8bc1c80: "drm/tilcdc: Add support for external tda998x
> encoder" from Feb 10, 2015, leads to the following Smatch complaint:
>
> drivers/gpu/drm/tilcdc/tilcdc_external.c:153 tilcdc_get_external_components()
> error: we previously assumed 'node' could be null (see line 148)
>
> drivers/gpu/drm/tilcdc/tilcdc_external.c
> 147 node = of_graph_get_remote_port_parent(ep);
> 148 if (!node && !of_device_is_available(node)) {
> ^^^^
>
> This test is probably reversed?
>
Not reversed, but the && should be ||. Then we always hit the
"continue", if node == NULL.
I'll make a fix for this tomorrow.
Thanks,
Jyri
> 149 of_node_put(node);
> ^^^^
> NULL.
>
> 150 continue;
> 151 }
> 152
> 153 dev_dbg(dev, "Subdevice node '%s' found\n", node->name);
> ^^^^^^^^^^^
> Unchecked dereference.
>
> 154 if (match)
> 155 component_match_add(dev, match, dev_match_of, node);
>
> regards,
> dan carpenter
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2015-06-11 19:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 15:11 drm/tilcdc: Add support for external tda998x encoder Dan Carpenter
2015-06-11 19:01 ` 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=5579DB16.9020808@ti.com \
--to=jsarha@ti.com \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox