]> git.baikalelectronics.ru Git - kernel.git/commit
Atheros, atl2: Fix mem leaks in error paths of atl2_set_eeprom
authorJesper Juhl <jj@chaosbits.net>
Sun, 27 Mar 2011 09:16:12 +0000 (09:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Mar 2011 09:42:25 +0000 (02:42 -0700)
commit452882c542822c46895d21ab9be0fbd387ce89af
tree1ec06208e25e6d39c0857d55ef4d1657dfba411d
parentdf6f94f3e5a5400620d8e908a97087b0e1d7d364
Atheros, atl2: Fix mem leaks in error paths of atl2_set_eeprom

We leak in some error paths of drivers/net/atlx/atl2.c:atl2_set_eeprom().
The memory allocated to 'eeprom_buff' is not freed when we return -EIO.
This patch fixes that up and also removes a pointless explicit cast.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/atlx/atl2.c