Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287542
b: refs/heads/master
c: 027a3b6
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Feb 9, 2012
1 parent 7eb8ab0 commit fe93348
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a46e0f95664bb65e3256f3c53b14b8a627c656b
refs/heads/master: 027a3b617c5490b5287d98921675abcbebeb32df
10 changes: 4 additions & 6 deletions trunk/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fe93348

Please sign in to comment.