netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislav Yakovlev <stas.yakovlev@gmail.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: linville@tuxdriver.com, yongjun_wei@trendmicro.com.cn,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH -next v2] ipw2200: return error code on error in ipw_wx_get_auth()
Date: Wed, 5 Dec 2012 01:44:50 -0800	[thread overview]
Message-ID: <CA++WF2OmLMP3NHvN44yVzsnWEHjeZVGfgG9CfC2CkZGyNQFLLw@mail.gmail.com> (raw)
In-Reply-To: <CAPgLHd_AN+Tr5EQFBZMH0FZCp6ESHVURZHvd9SuW=a2PYkPoXw@mail.gmail.com>

On 5 December 2012 00:08, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> We have assinged error code to 'ret' when get auth from some
> option is not supported but never used it, but we'd better return
> the error code.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Looks fine, thanks.

Stanislav.

> ---
>  drivers/net/wireless/ipw2x00/ipw2200.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
> index 482f505..b0879ad 100644
> --- a/drivers/net/wireless/ipw2x00/ipw2200.c
> +++ b/drivers/net/wireless/ipw2x00/ipw2200.c
> @@ -6812,7 +6812,6 @@ static int ipw_wx_get_auth(struct net_device *dev,
>         struct libipw_device *ieee = priv->ieee;
>         struct lib80211_crypt_data *crypt;
>         struct iw_param *param = &wrqu->param;
> -       int ret = 0;
>
>         switch (param->flags & IW_AUTH_INDEX) {
>         case IW_AUTH_WPA_VERSION:
> @@ -6822,8 +6821,7 @@ static int ipw_wx_get_auth(struct net_device *dev,
>                 /*
>                  * wpa_supplicant will control these internally
>                  */
> -               ret = -EOPNOTSUPP;
> -               break;
> +               return -EOPNOTSUPP;
>
>         case IW_AUTH_TKIP_COUNTERMEASURES:
>                 crypt = priv->ieee->crypt_info.crypt[priv->ieee->crypt_info.tx_keyidx];
>
>

      reply	other threads:[~2012-12-05  9:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05  8:08 [PATCH -next v2] ipw2200: return error code on error in ipw_wx_get_auth() Wei Yongjun
2012-12-05  9:44 ` Stanislav Yakovlev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA++WF2OmLMP3NHvN44yVzsnWEHjeZVGfgG9CfC2CkZGyNQFLLw@mail.gmail.com \
    --to=stas.yakovlev@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).