diff options
author | Simon Graham <simon.graham@virtualcomputer.com> | 2012-02-08 12:34:23 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-08 16:07:24 -0500 |
commit | 42bc0c9716c456a9686fcd4ee5cf115b992b9952 (patch) | |
tree | 167e14204cbc3de6857684f79fe8d21a336ddefb /drivers/net/wireless/rtlwifi | |
parent | 5ad20dd1480dc557afcec19ac7fae5581264dd59 (diff) | |
download | blackbird-op-linux-42bc0c9716c456a9686fcd4ee5cf115b992b9952.tar.gz blackbird-op-linux-42bc0c9716c456a9686fcd4ee5cf115b992b9952.zip |
rtlwifi: Return correct failure code on error
Callers of rtl_pci_init expect zero to be returned on error. Returning
the error code leads to, amongst other things, divide by zero panics
attempting to use the ring size that is set to zero.
Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index c503bd3b809e..8a941b588a41 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c @@ -1492,7 +1492,7 @@ static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev) if (err) { RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "tx ring initialization failed\n"); - return err; + return 0; } return 1; |