diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-03-01 13:24:22 +0100 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-03-01 13:26:51 +0100 |
commit | 89d4a1753b6632327f18d6c8e0842b366b736621 (patch) | |
tree | eb74be7a995d5b5b3f29f5c6794736a514109d80 /drivers/net/ethernet/brocade | |
parent | 7eca30aef7961e68ad74c0ef920546c2be7f6579 (diff) | |
parent | 280ad7fda5f95211857fda38960f2b6fdf6edd3e (diff) | |
download | blackbird-op-linux-89d4a1753b6632327f18d6c8e0842b366b736621.tar.gz blackbird-op-linux-89d4a1753b6632327f18d6c8e0842b366b736621.zip |
Merge branch 'irqdomain/next' of git://git.secretlab.ca/git/linux-2.6
Diffstat (limited to 'drivers/net/ethernet/brocade')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bnad_ethtool.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c index 9b44ec8096ba..803ea32aa99d 100644 --- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c +++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c @@ -946,7 +946,7 @@ bnad_get_flash_partition_by_offset(struct bnad *bnad, u32 offset, flash_attr = kzalloc(sizeof(struct bfa_flash_attr), GFP_KERNEL); if (!flash_attr) - return -ENOMEM; + return 0; fcomp.bnad = bnad; fcomp.comp_status = 0; @@ -958,7 +958,7 @@ bnad_get_flash_partition_by_offset(struct bnad *bnad, u32 offset, if (ret != BFA_STATUS_OK) { spin_unlock_irqrestore(&bnad->bna_lock, flags); kfree(flash_attr); - goto out_err; + return 0; } spin_unlock_irqrestore(&bnad->bna_lock, flags); wait_for_completion(&fcomp.comp); @@ -978,8 +978,6 @@ bnad_get_flash_partition_by_offset(struct bnad *bnad, u32 offset, } kfree(flash_attr); return flash_part; -out_err: - return -EINVAL; } static int @@ -1006,7 +1004,7 @@ bnad_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom, /* Query the flash partition based on the offset */ flash_part = bnad_get_flash_partition_by_offset(bnad, eeprom->offset, &base_offset); - if (flash_part <= 0) + if (flash_part == 0) return -EFAULT; fcomp.bnad = bnad; @@ -1048,7 +1046,7 @@ bnad_set_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom, /* Query the flash partition based on the offset */ flash_part = bnad_get_flash_partition_by_offset(bnad, eeprom->offset, &base_offset); - if (flash_part <= 0) + if (flash_part == 0) return -EFAULT; fcomp.bnad = bnad; |