[PATCH 00/24] ath6kl cleaned up driver

Dan Carpenter error27 at gmail.com
Wed Jul 13 09:33:21 UTC 2011


On Wed, Jul 13, 2011 at 12:22:57PM +0300, Dan Carpenter wrote:
> Nice.  :)
> 
> There are a some smatch warnings you might want to take a look at:
> 
> drivers/net/wireless/ath/ath6kl/sdio.c +373 ath6kl_sdio_setup_scat_resource(42) warn: 's_req' was already freed.
> drivers/net/wireless/ath/ath6kl/htc.c +2480 htc_create(74) warn: possible memory leak of 'packet'
> drivers/net/wireless/ath/ath6kl/txrx.c +156 ath6kl_powersave_ap(76) error: we previously assumed 'conn' could be null.
>   (The line number is off on that one.  Should be +142.  Odd)
> drivers/net/wireless/ath/ath6kl/txrx.c +758 ath6kl_alloc_amsdu_rxbuf(33) warn: can 'packet' even be NULL?
> drivers/net/wireless/ath/ath5k/phy.c +847 ath5k_hw_rfregs_init(152) error: potential null derefence 'go'.
> drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +3320 ar9300_eeprom_restore_internal(20) warn: returning -1 instead of -ENOMEM is sloppy
> drivers/net/wireless/ath/ath9k/hif_usb.c +135 hif_usb_mgmt_cb(6) warn: variable dereferenced before check 'cmd'
> drivers/net/wireless/ath/ath9k/pci.c +68 ath_pci_eeprom_read(12) error: buffer overflow 'pdata->eeprom_data' 2048 <= 2048

Ah...  Half of those are for other atheros drivers...  I didn't
read the warnings carefully.

Btw in drivers/net/wireless/ath/ath9k/debug.c read_file_stations()
the we use kmalloc() to allocate a 64000 char buffer.  That's a lot
of contiguous memory to try allocate.  (But obviously that's ath9k
and not this drivers)...

regards,
dan carpenter




More information about the devel mailing list