Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[deliverable/linux.git] / drivers / net / ethernet / brocade / bna / bnad_ethtool.c
index a27c601af3d1c5ccc2c092b1f191a128ebb700b8..ab753d7334a62bb61616276a34a1aa51654f93b7 100644 (file)
@@ -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;
This page took 0.025164 seconds and 5 git commands to generate.