Commit c27111e5 authored by Simon Graham's avatar Simon Graham Committed by John W. Linville

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: default avatarSimon Graham <simon.graham@virtualcomputer.com>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b57e6b56
...@@ -1501,7 +1501,7 @@ static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev) ...@@ -1501,7 +1501,7 @@ static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev)
return err; return err;
} }
return 1; return 0;
} }
static int rtl_pci_start(struct ieee80211_hw *hw) static int rtl_pci_start(struct ieee80211_hw *hw)
...@@ -1870,7 +1870,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, ...@@ -1870,7 +1870,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
} }
/* Init PCI sw */ /* Init PCI sw */
err = !rtl_pci_init(hw, pdev); err = rtl_pci_init(hw, pdev);
if (err) { if (err) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Failed to init PCI.\n")); ("Failed to init PCI.\n"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment