Messages in this thread | | | From | Colin Ian King <> | Subject | Static analysis bug report: atm: idt77252 | Date | Mon, 18 Mar 2019 10:17:49 +0000 |
| |
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
| |