diff options
author | Sony Chacko <sony.chacko@qlogic.com> | 2010-08-26 10:02:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-26 20:13:18 -0400 |
commit | 8cfdce080722101a7fd2a1eff9763ca4008ec626 (patch) | |
tree | 3e086875b9a67aff953c4af654e9197bcc4ec5fc /drivers/net/qlcnic | |
parent | 53f91dc1f76922375ad7957ef29f48986722532d (diff) |
qlcnic: Fix missing error codes
In the original code, the error codes returned from some of the functions
are not caught and sent up the caller chain. Fixed it here.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 630a077e4547..1b8f67dab9b8 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -967,7 +967,8 @@ qlcnic_start_firmware(struct qlcnic_adapter *adapter) | |||
967 | if (load_fw_file) | 967 | if (load_fw_file) |
968 | qlcnic_request_firmware(adapter); | 968 | qlcnic_request_firmware(adapter); |
969 | else { | 969 | else { |
970 | if (qlcnic_check_flash_fw_ver(adapter)) | 970 | err = qlcnic_check_flash_fw_ver(adapter); |
971 | if (err) | ||
971 | goto err_out; | 972 | goto err_out; |
972 | 973 | ||
973 | adapter->fw_type = QLCNIC_FLASH_ROMIMAGE; | 974 | adapter->fw_type = QLCNIC_FLASH_ROMIMAGE; |
@@ -998,9 +999,11 @@ set_dev_ready: | |||
998 | QLCWR32(adapter, QLCNIC_CRB_DEV_STATE, QLCNIC_DEV_READY); | 999 | QLCWR32(adapter, QLCNIC_CRB_DEV_STATE, QLCNIC_DEV_READY); |
999 | qlcnic_idc_debug_info(adapter, 1); | 1000 | qlcnic_idc_debug_info(adapter, 1); |
1000 | 1001 | ||
1001 | if (qlcnic_set_default_offload_settings(adapter)) | 1002 | err = qlcnic_set_default_offload_settings(adapter); |
1003 | if (err) | ||
1002 | goto err_out; | 1004 | goto err_out; |
1003 | if (qlcnic_reset_npar_config(adapter)) | 1005 | err = qlcnic_reset_npar_config(adapter); |
1006 | if (err) | ||
1004 | goto err_out; | 1007 | goto err_out; |
1005 | qlcnic_dev_set_npar_ready(adapter); | 1008 | qlcnic_dev_set_npar_ready(adapter); |
1006 | qlcnic_check_options(adapter); | 1009 | qlcnic_check_options(adapter); |
@@ -1515,7 +1518,8 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1515 | if (qlcnic_read_mac_addr(adapter)) | 1518 | if (qlcnic_read_mac_addr(adapter)) |
1516 | dev_warn(&pdev->dev, "failed to read mac addr\n"); | 1519 | dev_warn(&pdev->dev, "failed to read mac addr\n"); |
1517 | 1520 | ||
1518 | if (qlcnic_setup_idc_param(adapter)) | 1521 | err = qlcnic_setup_idc_param(adapter); |
1522 | if (err) | ||
1519 | goto err_out_iounmap; | 1523 | goto err_out_iounmap; |
1520 | 1524 | ||
1521 | err = adapter->nic_ops->start_firmware(adapter); | 1525 | err = adapter->nic_ops->start_firmware(adapter); |