aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx/atl2.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-01-11 01:55:03 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-11 01:55:03 -0500
commitd4a66e752d0b19934dd208884f8605fe385aaaa9 (patch)
tree72fb727be1d7636aae9cddfe9aa93ac9dec75daf /drivers/net/atlx/atl2.c
parentbdbec4b86ee99b020e159f9bd604003a3ae3b0ab (diff)
parentfa15e99b6bb44aa86b241a43ca8c509e91f80153 (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/atl2.c')
-rw-r--r--drivers/net/atlx/atl2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index 255e4e7ea0ee..40cf9e5cb9e2 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,
1959 return -ENOMEM; 1959 return -ENOMEM;
1960 1960
1961 for (i = first_dword; i < last_dword; i++) { 1961 for (i = first_dword; i < last_dword; i++) {
1962 if (!atl2_read_eeprom(hw, i*4, &(eeprom_buff[i-first_dword]))) 1962 if (!atl2_read_eeprom(hw, i*4, &(eeprom_buff[i-first_dword]))) {
1963 return -EIO; 1963 ret_val = -EIO;
1964 goto free;
1965 }
1964 } 1966 }
1965 1967
1966 memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 3), 1968 memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 3),
1967 eeprom->len); 1969 eeprom->len);
1970free:
1968 kfree(eeprom_buff); 1971 kfree(eeprom_buff);
1969 1972
1970 return ret_val; 1973 return ret_val;