diff options
author | Simon Graham <simon.graham@virtualcomputer.com> | 2012-02-09 09:55:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-09 15:17:29 -0500 |
commit | c27111e5b8d6b1e9296f7075cdc35872f672b524 (patch) | |
tree | 44fc683ecd2b5cf186979b16f6a7c149e24675e1 /drivers/net/wireless | |
parent | b57e6b560fc2a2742910ac5ca0eb2c46e45aeac2 (diff) |
rtlwifi: Modify rtl_pci_init to return 0 on success
Fixes problem where caller would think routine succeeded when it failed
leading to divide by zero panic.
Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 39e0907a3c4e..9245d882c06a 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -1501,7 +1501,7 @@ static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev) | |||
1501 | return err; | 1501 | return err; |
1502 | } | 1502 | } |
1503 | 1503 | ||
1504 | return 1; | 1504 | return 0; |
1505 | } | 1505 | } |
1506 | 1506 | ||
1507 | static int rtl_pci_start(struct ieee80211_hw *hw) | 1507 | static int rtl_pci_start(struct ieee80211_hw *hw) |
@@ -1870,7 +1870,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, | |||
1870 | } | 1870 | } |
1871 | 1871 | ||
1872 | /* Init PCI sw */ | 1872 | /* Init PCI sw */ |
1873 | err = !rtl_pci_init(hw, pdev); | 1873 | err = rtl_pci_init(hw, pdev); |
1874 | if (err) { | 1874 | if (err) { |
1875 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 1875 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
1876 | ("Failed to init PCI.\n")); | 1876 | ("Failed to init PCI.\n")); |