ath5k: improve pcal error handling for ENOMEM case
authorJohn W. Linville <linville@tuxdriver.com>
Fri, 8 Apr 2011 19:33:12 +0000 (15:33 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 12 Apr 2011 20:58:56 +0000 (16:58 -0400)
commita065784620a2b78a2bbd00e066c004644d227ea8
treece1bb7881fbd34d3dc65cd5da7f9b0d0cadc686e
parentba30c4a58ceb10e81dbf6bd80aeb6a4db42db8fe
ath5k: improve pcal error handling for ENOMEM case

The ath5k driver does kmalloc allocations for pcal info in a loop.
But, if one fails it was simply returning -ENOMEM without freeing
already allocated memory.  This patch corrects that oversight.

Reported-by: Eugene A. Shatokhin <dame_eugene@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
drivers/net/wireless/ath/ath5k/eeprom.c