From patchwork Wed Jun 19 02:40:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2746801 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 92FEF9F39E for ; Wed, 19 Jun 2013 02:40:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD5922028D for ; Wed, 19 Jun 2013 02:40:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BFB820286 for ; Wed, 19 Jun 2013 02:40:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933836Ab3FSCkL (ORCPT ); Tue, 18 Jun 2013 22:40:11 -0400 Received: from mail-bk0-f49.google.com ([209.85.214.49]:53573 "EHLO mail-bk0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933453Ab3FSCkK (ORCPT ); Tue, 18 Jun 2013 22:40:10 -0400 Received: by mail-bk0-f49.google.com with SMTP id mz10so2092414bkb.22 for ; Tue, 18 Jun 2013 19:40:09 -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=RIySwMI/AGv5yjwqRIGGsw5vj/Yv070j7hBj1pyJhhQ=; b=cP5zbisiPkW4dk4LawOzLU9wuW7Q8+VSlsBAuFm+bjVzlxaYVnTdRbwv6ekiBYzb9s cFA5lt6rGyKHLDEJWB5EHUW8zlO9zydpITpzboJjendwKtkzAPoAdio+H8EjEkx3cxUR 5EMTv39dlEZkqyj1EsOhjFa4NAFXJ0J2WCgsp8l113OP3Bo+fXh6xW7TMyrEb52KIgli dQASLQCycTuNeQj/qqhByFoboN1ofSHuGb/keZhxEmVbbr6Bd24UjRVquth9oSfp2uIl k+fjmsPDiJNeICcl8DbSP+/7p8r84Uqq6xpi6Ka0pLMgoRoejMZ+iPMge8C20B3Wrcnq EVsQ== MIME-Version: 1.0 X-Received: by 10.204.236.136 with SMTP id kk8mr79057bkb.151.1371609609173; Tue, 18 Jun 2013 19:40:09 -0700 (PDT) Received: by 10.204.42.138 with HTTP; Tue, 18 Jun 2013 19:40:09 -0700 (PDT) Date: Wed, 19 Jun 2013 10:40:09 +0800 Message-ID: Subject: [PATCH] IB/ehca: Fix error return code in ehca_create_slab_caches() From: Wei Yongjun To: hnguyen@de.ibm.com, raisch@de.ibm.com, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, grant.likely@linaro.org, rob.herring@calxeda.com Cc: yongjun_wei@trendmicro.com.cn, linux-rdma@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-8.0 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=unavailable 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 kmem_cache_create() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/infiniband/hw/ehca/ehca_main.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index f8a6291..8f43093 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c @@ -211,6 +211,7 @@ static int ehca_create_slab_caches(void) if (!ctblk_cache) { ehca_gen_err("Cannot create ctblk SLAB cache."); ehca_cleanup_small_qp_cache(); + ret = -ENOMEM; goto create_slab_caches6; } #endif