lkml.org 
[lkml]   [2019]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectStatic analysis bug report: atm: idt77252
Date
Hi,

Static analysis with cppcheck has detected an uninitialized variable in
the idt77252 driver:

The variable linkrate is only initialized when
CONFIG_ATM_IDT77252_USE_SUNI is enabled:

#ifdef CONFIG_ATM_IDT77252_USE_SUNI
/*
* this is a jhs hack to get around special functionality in the
* phy driver for the atecom hardware; the functionality doesn't
* exist in the linux atm suni driver
*
* it isn't the right way to do things, but as the guy from NIST
* said, talking about their measurement of the fine structure
* constant, "it's good enough for government work."
*/
linkrate = 149760000;
#endif

card->link_pcr = (linkrate / 8 / 53);

I suspect the driver is being used with CONFIG_ATM_IDT77252_USE_SUNI
enabled, however, this probably needs fixing with the correct value
(whatever that is) when CONFIG_ATM_IDT77252_USE_SUNI is not enabled.

Colin

\
 
 \ /
  Last update: 2019-03-18 11:18    [W:0.040 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site