[BUG] net: ethernet: lpc_eth: possible uninitialized-variable access in lpc_eth_drv_probe()

From: Li Tuo <hidden>
Date: 2021-07-31 06:34:23
Also in: linux-arm-kernel, lkml

Hello,

Our static analysis tool finds a possible uninitialized-variable access 
in the nxp driver in Linux 5.14.0-rc3:

At the beginning of the function lpc_eth_drv_probe(), the variable 
dma_handle is not initialized.
If the following conditions are false, it remains uninitialized.
1304:    if (use_iram_for_net(dev))
1314:    if (pldat->dma_buff_base_v == NULL)

However, it is accessed through:
1333:    pldat->dma_buff_base_p = dma_handle;;

I am not quite sure whether this possible uninitialized-variable access 
is real and how to fix it if it is real.
Any feedback would be appreciated, thanks!

Reported-by: TOTE Robot <redacted>

Best wishes,
Tuo Li
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help