]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rtlwifi: Modify rtl_pci_init to return 0 on success
authorSimon Graham <simon.graham@virtualcomputer.com>
Thu, 9 Feb 2012 14:55:13 +0000 (09:55 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 9 Feb 2012 20:17:29 +0000 (15:17 -0500)
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>
drivers/net/wireless/rtlwifi/pci.c

index 39e0907a3c4eac8d89a9f682dc53d8471cbec560..9245d882c06a3046dfb3d052456e6174d99d2a97 100644 (file)
@@ -1501,7 +1501,7 @@ static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev)
                return err;
        }
 
-       return 1;
+       return 0;
 }
 
 static int rtl_pci_start(struct ieee80211_hw *hw)
@@ -1870,7 +1870,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
        }
 
        /* Init PCI sw */
-       err = !rtl_pci_init(hw, pdev);
+       err = rtl_pci_init(hw, pdev);
        if (err) {
                RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
                         ("Failed to init PCI.\n"));