2012-10-14 20:16:02

by Christian Lamparter

[permalink] [raw]
Subject: [PATCH] rtlwifi: pass rx setup error code to caller

If _rtl_usb_receive fails, the device is
probably not ready. Hence the error code
should be passed to the caller, so it can
react accordingly and notify the user.

Signed-off-by: Christian Lamparter <[email protected]>
---
rtlwifi/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rtlwifi/usb.c b/rtlwifi/usb.c
index d7744e1..696d29f 100644
--- a/rtlwifi/usb.c
+++ b/rtlwifi/usb.c
@@ -682,7 +682,7 @@ static int rtl_usb_start(struct ieee80211_hw *hw)
set_hal_start(rtlhal);

/* Start bulk IN */
- _rtl_usb_receive(hw);
+ err = _rtl_usb_receive(hw);
}

return err;
--
1.7.10.4



2012-10-14 23:14:55

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] rtlwifi: pass rx setup error code to caller

On 10/14/2012 03:15 PM, Christian Lamparter wrote:
> If _rtl_usb_receive fails, the device is
> probably not ready. Hence the error code
> should be passed to the caller, so it can
> react accordingly and notify the user.
>
> Signed-off-by: Christian Lamparter <[email protected]>
> ---
> rtlwifi/usb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

ACKed-by: Larry Finger <[email protected]>


>
> diff --git a/rtlwifi/usb.c b/rtlwifi/usb.c
> index d7744e1..696d29f 100644
> --- a/rtlwifi/usb.c
> +++ b/rtlwifi/usb.c
> @@ -682,7 +682,7 @@ static int rtl_usb_start(struct ieee80211_hw *hw)
> set_hal_start(rtlhal);
>
> /* Start bulk IN */
> - _rtl_usb_receive(hw);
> + err = _rtl_usb_receive(hw);
> }
>
> return err;
>