Powered by Linux
Re: Question on a error handling related warning — Semantic Matching Tool

Re: Question on a error handling related warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 09, 2024 at 05:43:11AM +0000, Harshit Mogalapalli wrote:
> Hi Dan,
> 
> drivers/net/ethernet/cirrus/ep93xx_eth.c:852 ep93xx_eth_probe() warn: 'dev' from alloc_etherdev_mqs() not released on lines: 852.
> 
> This looks like a false positive as the free(free_netdev(dev); is present in the remove function, is that correct ?
> 
> How do we let smatch know about this ?

Yeah.  This is a false positive.  The free_netdev() is recorded correctly in
the database

drivers/net/ethernet/cirrus/ep93xx_eth.c | ep93xx_eth_remove | 302 |              |         RELEASE |  0 |   $->dev.driver_data |                      |

But smatch_ssa.c is not tracking that calling free_netdev(pdev->dev.driver_data)
and free_netdev(dev) is the same.

regards,
dan carpenter





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux