diff options
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 3c8a963f68a9..bfc551029537 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -1949,8 +1949,8 @@ static void qlcnic_poll_controller(struct net_device *netdev) | |||
1949 | } | 1949 | } |
1950 | #endif | 1950 | #endif |
1951 | 1951 | ||
1952 | static void | 1952 | static int |
1953 | qlcnic_set_drv_state(struct qlcnic_adapter *adapter, int state) | 1953 | qlcnic_set_drv_state(struct qlcnic_adapter *adapter, u8 state) |
1954 | { | 1954 | { |
1955 | u32 val; | 1955 | u32 val; |
1956 | 1956 | ||
@@ -1958,7 +1958,7 @@ qlcnic_set_drv_state(struct qlcnic_adapter *adapter, int state) | |||
1958 | state != QLCNIC_DEV_NEED_QUISCENT); | 1958 | state != QLCNIC_DEV_NEED_QUISCENT); |
1959 | 1959 | ||
1960 | if (qlcnic_api_lock(adapter)) | 1960 | if (qlcnic_api_lock(adapter)) |
1961 | return ; | 1961 | return -EIO; |
1962 | 1962 | ||
1963 | val = QLCRD32(adapter, QLCNIC_CRB_DRV_STATE); | 1963 | val = QLCRD32(adapter, QLCNIC_CRB_DRV_STATE); |
1964 | 1964 | ||
@@ -1970,6 +1970,8 @@ qlcnic_set_drv_state(struct qlcnic_adapter *adapter, int state) | |||
1970 | QLCWR32(adapter, QLCNIC_CRB_DRV_STATE, val); | 1970 | QLCWR32(adapter, QLCNIC_CRB_DRV_STATE, val); |
1971 | 1971 | ||
1972 | qlcnic_api_unlock(adapter); | 1972 | qlcnic_api_unlock(adapter); |
1973 | |||
1974 | return 0; | ||
1973 | } | 1975 | } |
1974 | 1976 | ||
1975 | static int | 1977 | static int |
@@ -2195,7 +2197,8 @@ qlcnic_detach_work(struct work_struct *work) | |||
2195 | if (adapter->temp == QLCNIC_TEMP_PANIC) | 2197 | if (adapter->temp == QLCNIC_TEMP_PANIC) |
2196 | goto err_ret; | 2198 | goto err_ret; |
2197 | 2199 | ||
2198 | qlcnic_set_drv_state(adapter, adapter->dev_state); | 2200 | if (qlcnic_set_drv_state(adapter, adapter->dev_state)) |
2201 | goto err_ret; | ||
2199 | 2202 | ||
2200 | adapter->fw_wait_cnt = 0; | 2203 | adapter->fw_wait_cnt = 0; |
2201 | 2204 | ||