2013-06-21 02:42:20

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] ipw2200: fix error return code in ipw_load()

From: Wei Yongjun <[email protected]>

Fix to return -ENOMEM in the ipw_rx_queue_alloc() error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/net/wireless/ipw2x00/ipw2200.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 4ed5e45..6b823a1 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -3548,6 +3548,7 @@ static int ipw_load(struct ipw_priv *priv)
ipw_rx_queue_reset(priv, priv->rxq);
if (!priv->rxq) {
IPW_ERROR("Unable to initialize Rx queue\n");
+ rc = -ENOMEM;
goto error;
}




2013-06-22 02:41:53

by Stanislav Yakovlev

[permalink] [raw]
Subject: Re: [PATCH] ipw2200: fix error return code in ipw_load()

Hi Wei,

On 20 June 2013 19:42, Wei Yongjun <[email protected]> wrote:
> From: Wei Yongjun <[email protected]>
>
> Fix to return -ENOMEM in the ipw_rx_queue_alloc() error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---

Looks fine, thanks.

Stanislav.