From patchwork Fri Jun 21 02:42:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2759861 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B2578C0AB1 for ; Fri, 21 Jun 2013 02:42:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDD4A201B4 for ; Fri, 21 Jun 2013 02:42:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 195C4201B0 for ; Fri, 21 Jun 2013 02:42:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161392Ab3FUCmV (ORCPT ); Thu, 20 Jun 2013 22:42:21 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:49777 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161389Ab3FUCmU (ORCPT ); Thu, 20 Jun 2013 22:42:20 -0400 Received: by mail-wg0-f47.google.com with SMTP id l18so5997566wgh.2 for ; Thu, 20 Jun 2013 19:42:19 -0700 (PDT) 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=v1Pfz8r595LowhL4kYMJFHo7XSzhY7sk9ARHVkgnlJg=; b=NA0PE0zI3VvbFzdM7Jm+dox5sDJDxu8cOxjfp8pusptTrcqe2oHACNFqiUH23YJ9SX Uq2LkQGkETkESCc2EQHvu9j/rl0Xc2IHm6lvd8N92cRzfCs9t48Vo/iHqLKZdUSuLgkK sOHfGopevSWLPk91k7HFPQjQr+2PfZi1GZlWyqvBjQ/Pk6y+kQSPdRZ+X0F/8voK/AiV fKqmDalJDIFCQmRFmtifr3FIG+D/FRv2a8wuzPXNQ3nRAHrzap90JpZ8yxMZDb5p528V Lk+q01InAbLnJZPpPrOAUVP6lRJablfY4p7u2Wgax3Oasvx40UtYFag1aNTSvDy7kl9c /5yw== MIME-Version: 1.0 X-Received: by 10.194.22.1 with SMTP id z1mr7746714wje.14.1371782539365; Thu, 20 Jun 2013 19:42:19 -0700 (PDT) Received: by 10.194.240.167 with HTTP; Thu, 20 Jun 2013 19:42:19 -0700 (PDT) Date: Fri, 21 Jun 2013 10:42:19 +0800 Message-ID: Subject: [PATCH] ipw2200: fix error return code in ipw_load() 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 X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun 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 --- drivers/net/wireless/ipw2x00/ipw2200.c | 1 + 1 file changed, 1 insertion(+) -- 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 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; }