lkml.org 
[lkml]   [2020]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectre: net: dsa: sja1105: use detected device id instead of DT one on mismatch
Date
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

\
 
 \ /
  Last update: 2020-08-06 19:56    [W:0.030 / U:2.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site