From patchwork Tue Dec 4 06:03:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1836111 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2A08CDF23A for ; Tue, 4 Dec 2012 06:03:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750840Ab2LDGDO (ORCPT ); Tue, 4 Dec 2012 01:03:14 -0500 Received: from mail-qa0-f53.google.com ([209.85.216.53]:46050 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750826Ab2LDGDN (ORCPT ); Tue, 4 Dec 2012 01:03:13 -0500 Received: by mail-qa0-f53.google.com with SMTP id a19so452006qad.19 for ; Mon, 03 Dec 2012 22:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=mUKS2wP1+yQq2Ejw59N4UYHAhJKXGcW0Yu2wD2k0fH8=; b=0QAAIiZDjVcOJXFlu91ZZEScK47QBAb2Co4RJfPPyL+ebJruwvXI8fmawMsClywANf FmqvHSKLXPAZZEGDgw9eBfcRkDWKBFa6ulHKHiLplQfWis1cmHci17B9z/s2cRNbojbm iwoDZYJ5Vgq2vR2MJYMSYGXagGFKJ/SYZsvCWgyKb5Hl21RlOMPpJBxyVdK07i7J8KuP 7mFZTRzA5amrbRQU4oGKlrzlXIMP+Jgf9xETx94uM3XCGzlCYWDVe+7pXtxhTXFlKk7e KeSUAUq0WYc5zx73M80YUVP9RkN0G6bpQYg6vYsFUarYs9lBCFwtUWz6/gNvsTdtBfcl cXeA== MIME-Version: 1.0 Received: by 10.224.191.6 with SMTP id dk6mr20696138qab.71.1354600993144; Mon, 03 Dec 2012 22:03:13 -0800 (PST) Received: by 10.229.126.165 with HTTP; Mon, 3 Dec 2012 22:03:12 -0800 (PST) Date: Tue, 4 Dec 2012 01:03:12 -0500 Message-ID: Subject: [PATCH -next] ipw2200: return error code on error in ipw_wx_get_auth() From: Wei Yongjun To: stas.yakovlev@gmail.com, linville@tuxdriver.com Cc: yongjun_wei@trendmicro.com.cn, linux-wireless@vger.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wei Yongjun 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 --- drivers/net/wireless/ipw2x00/ipw2200.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 482f505..1ad72d5 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,7 +6821,7 @@ static int ipw_wx_get_auth(struct net_device *dev, /* * wpa_supplicant will control these internally */ - ret = -EOPNOTSUPP; + return -EOPNOTSUPP; break; case IW_AUTH_TKIP_COUNTERMEASURES: