From patchwork Wed Mar 20 12:22:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2307431 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 17142E00E6 for ; Wed, 20 Mar 2013 12:23:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758197Ab3CTMW5 (ORCPT ); Wed, 20 Mar 2013 08:22:57 -0400 Received: from mail-bk0-f43.google.com ([209.85.214.43]:51823 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756568Ab3CTMW4 (ORCPT ); Wed, 20 Mar 2013 08:22:56 -0400 Received: by mail-bk0-f43.google.com with SMTP id jm19so796829bkc.16 for ; Wed, 20 Mar 2013 05:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=LlgzkjkKlZVAGUJOJOkRbod46iQThy30hymMRWrbPUQ=; b=lGR1+moN+YVhbWI0Y/OL1ym/hlIvwwTnCNTOOX9Ae9iRucb6vnpFe21mNbyYe6gZfA FTvAlOytl1TlMSOR2PDiW2gPv++lLqOAqwHV7GZrDeAzf8z+Fu9NAtHQV4uzznnMxVNh nT1N1kiLwbGINVQZTWvfmAOv/odhQQ+N3c4Flq7uhDTG8QHzMXO1/DkiOMMpxOlCPk7L HsoDNrP5Up28c3Ktmy0UmOeoMDOKaZIsBmak2kQzJfjvGieYcny6iFfxf+5wmIAeeurb RCWdYp/Febz3gcQOWuQ1jG3CBx/RQ9h8ww1YuPwSvqyfzoyiH9PP7ZKpGdNiwBbsx6um ExoA== MIME-Version: 1.0 X-Received: by 10.205.104.8 with SMTP id dk8mr10781721bkc.34.1363782174874; Wed, 20 Mar 2013 05:22:54 -0700 (PDT) Received: by 10.204.30.210 with HTTP; Wed, 20 Mar 2013 05:22:54 -0700 (PDT) Date: Wed, 20 Mar 2013 20:22:54 +0800 Message-ID: Subject: [PATCH -next] cfg80211: fix error return code in cfg80211_init() From: Wei Yongjun To: johannes@sipsolutions.net, 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 Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun --- net/wireless/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 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/net/wireless/core.c b/net/wireless/core.c index f382cae..92e3fd4 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1096,8 +1096,10 @@ static int __init cfg80211_init(void) goto out_fail_reg; cfg80211_wq = create_singlethread_workqueue("cfg80211"); - if (!cfg80211_wq) + if (!cfg80211_wq) { + err = -ENOMEM; goto out_fail_wq; + } return 0;