Netdev List
 help / color / mirror / Atom feed
* re: net: dsa: sja1105: use detected device id instead of DT one on mismatch
@ 2020-08-06 16:27 Colin Ian King
  2020-08-06 19:25 ` Vladimir Oltean
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2020-08-06 16:27 UTC (permalink / raw)
  To: Vladimir Oltean, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	David S. Miller, Jakub Kicinski
  Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org

Hi,

Static analysis with Coverity has detected a potential issue with the
following commit:

commit 0b0e299720bb99428892a23ecbd2b4b7f61ccf6d
Author: Vladimir Oltean <olteanv@gmail.com>
Date:   Mon Aug 3 19:48:23 2020 +0300

    net: dsa: sja1105: use detected device id instead of DT one on mismatch

The analysis is as follows:

Array compared against 0 (NO_EFFECT)array_null: Comparing an array to
null is not useful: match->compatible, since the test will always
evaluate as true.

    Was match->compatible formerly declared as a pointer?

3418        for (match = sja1105_dt_ids; match->compatible; match++) {
3419                const struct sja1105_info *info = match->data;
3420

I'm not sure what the original intention was, so I was unable to fix
this hence I'm sending this report as I think it needs addressing.

Colin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-06 19:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-06 16:27 net: dsa: sja1105: use detected device id instead of DT one on mismatch Colin Ian King
2020-08-06 19:25 ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox