diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-10 22:55:03 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-10 22:55:03 -0800 |
commit | d4a66e752d0b19934dd208884f8605fe385aaaa9 (patch) | |
tree | 72fb727be1d7636aae9cddfe9aa93ac9dec75daf /drivers/net/atlx | |
parent | bdbec4b86ee99b020e159f9bd604003a3ae3b0ab (diff) | |
parent | fa15e99b6bb44aa86b241a43ca8c509e91f80153 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/benet/be_cmds.h
include/linux/sysctl.h
Diffstat (limited to 'drivers/net/atlx')
-rw-r--r-- | drivers/net/atlx/atl2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index 255e4e7ea0e..40cf9e5cb9e 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c @@ -1959,12 +1959,15 @@ static int atl2_get_eeprom(struct net_device *netdev, return -ENOMEM; for (i = first_dword; i < last_dword; i++) { - if (!atl2_read_eeprom(hw, i*4, &(eeprom_buff[i-first_dword]))) - return -EIO; + if (!atl2_read_eeprom(hw, i*4, &(eeprom_buff[i-first_dword]))) { + ret_val = -EIO; + goto free; + } } memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 3), eeprom->len); +free: kfree(eeprom_buff); return ret_val; |