diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-04-08 12:13:58 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 22:00:37 +0400 |
commit | cfe31f81e1ba7e0c590fc1f2fd688309b685654a (patch) | |
tree | 6e1e026ef3d251c433b756b40dd7333253c236ff /drivers/staging/winbond | |
parent | 80767e6e1e545b5cd7e7c6962fe0e06589d48ae2 (diff) | |
download | linux-cfe31f81e1ba7e0c590fc1f2fd688309b685654a.tar.xz |
Staging: w35und: simplify error handling in wb35_hw_init()
Impact: cleanup
Change hal_init_hardware() to return an error code rather than a boolean
to simplify error handling in wb35_hw_init().
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/winbond')
-rw-r--r-- | drivers/staging/winbond/wbusb.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c index e91d611ad95f..897ac94f63af 100644 --- a/drivers/staging/winbond/wbusb.c +++ b/drivers/staging/winbond/wbusb.c @@ -476,7 +476,7 @@ static void hal_led_control(unsigned long data) add_timer(&pHwData->LEDTimer); } -static u8 hal_init_hardware(struct ieee80211_hw *hw) +static int hal_init_hardware(struct ieee80211_hw *hw) { struct wbsoft_priv *priv = hw->priv; struct hw_data * pHwData = &priv->sHwData; @@ -514,13 +514,13 @@ static u8 hal_init_hardware(struct ieee80211_hw *hw) Wb35Rx_start(hw); Wb35Tx_EP2VM_start(priv); - return true; + return 0; } } } pHwData->SurpriseRemove = 1; - return false; + return -EINVAL; } static int wb35_hw_init(struct ieee80211_hw *hw) @@ -555,10 +555,9 @@ static int wb35_hw_init(struct ieee80211_hw *hw) // Initial USB hal pHwData = &priv->sHwData; - if (!hal_init_hardware(hw)) { - err = -EINVAL; + err = hal_init_hardware(hw); + if (err) goto error; - } EEPROM_region = hal_get_region_from_EEPROM( pHwData ); if (EEPROM_region != REGION_AUTO) |