* [PATCH v3] rtlwifi: Modify rtl_pci_init to return 0 on success
@ 2012-02-09 14:55 Simon Graham
2012-02-09 15:15 ` Larry Finger
0 siblings, 1 reply; 2+ messages in thread
From: Simon Graham @ 2012-02-09 14:55 UTC (permalink / raw)
To: linux-wireless; +Cc: Simon Graham, linville, Larry.Finger, chaoming_li
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>
---
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 fb84707..16ec0c1 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1495,7 +1495,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)
@@ -1866,7 +1866,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");
goto fail3;
--
1.7.9
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v3] rtlwifi: Modify rtl_pci_init to return 0 on success
2012-02-09 14:55 [PATCH v3] rtlwifi: Modify rtl_pci_init to return 0 on success Simon Graham
@ 2012-02-09 15:15 ` Larry Finger
0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2012-02-09 15:15 UTC (permalink / raw)
To: Simon Graham, linville; +Cc: linux-wireless, chaoming_li
On 02/09/2012 08:55 AM, Simon Graham wrote:
> 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>
Simon: Congratulations - your mailer mangling problem seems to be fixed.
John: This is V3.3 and stable material. This bug goes back to at least 2.6.39.
Larry
> 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 fb84707..16ec0c1 100644
> --- a/drivers/net/wireless/rtlwifi/pci.c
> +++ b/drivers/net/wireless/rtlwifi/pci.c
> @@ -1495,7 +1495,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)
> @@ -1866,7 +1866,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");
> goto fail3;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-09 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 14:55 [PATCH v3] rtlwifi: Modify rtl_pci_init to return 0 on success Simon Graham
2012-02-09 15:15 ` Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox