From patchwork Mon Mar 15 08:23:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 85901 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2F8Nq2N016278 for ; Mon, 15 Mar 2010 08:23:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759871Ab0COIXv (ORCPT ); Mon, 15 Mar 2010 04:23:51 -0400 Received: from mail-fx0-f227.google.com ([209.85.220.227]:48336 "EHLO mail-fx0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759859Ab0COIXu (ORCPT ); Mon, 15 Mar 2010 04:23:50 -0400 Received: by fxm27 with SMTP id 27so3582571fxm.28 for ; Mon, 15 Mar 2010 01:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=B3OKBOR7n7tBfbL5gFpev/ynQtoMu+FWETsVcQkcAhQ=; b=s8CZyBi9TxMlL4vSwd9LL4BwqB/MiINFdekAPSJLMFAPGw/lqCTiD604Aib/6/+Xse U4jCyLNsstLwWqqJDf3B3gcOSLCZR5JRDG6+8UueLx0uIqceSSvx1GQmNdFNfxwWkoAo E2pEm/yzQdyvyb4YQyaDGHn3rSkZPoNHuv0tQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=hygUblU9oPN1kBMsl02CtZYrvzLd1ol2x1rQAoXJM4I5Q7QzM+wl+6v+sJ0ee95iTq B5vaA80ZaShL5HhV8ScJx5YTELlOSrdAgGkljwFosw69uJIfvqRBrntVwSuKl244VfpG WlMXZjBMP25WWdjshelll22uV7fm6e8IF5yDE= Received: by 10.103.126.37 with SMTP id d37mr4026069mun.66.1268641428955; Mon, 15 Mar 2010 01:23:48 -0700 (PDT) Received: from bicker ([196.43.68.177]) by mx.google.com with ESMTPS id 12sm18975891muq.31.2010.03.15.01.23.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Mar 2010 01:23:47 -0700 (PDT) Date: Mon, 15 Mar 2010 11:23:32 +0300 From: Dan Carpenter To: Roland Dreier Cc: Sean Hefty , Hal Rosenstock , Or Gerlitz , Thadeu Lima de Souza Cascardo , Jiri Kosina , linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] infiniband: remove dead code Message-ID: <20100315082332.GF18181@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 15 Mar 2010 08:23:52 +0000 (UTC) diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 308d17b..8fa6997 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -148,10 +148,8 @@ static int iser_create_ib_conn_res(struct iser_conn *ib_conn) device = ib_conn->device; ib_conn->login_buf = kmalloc(ISER_RX_LOGIN_SIZE, GFP_KERNEL); - if (!ib_conn->login_buf) { + if (!ib_conn->login_buf) goto alloc_err; - ret = -ENOMEM; - } ib_conn->login_dma = ib_dma_map_single(ib_conn->device->ib_device, (void *)ib_conn->login_buf, ISER_RX_LOGIN_SIZE, @@ -160,10 +158,9 @@ static int iser_create_ib_conn_res(struct iser_conn *ib_conn) ib_conn->page_vec = kmalloc(sizeof(struct iser_page_vec) + (sizeof(u64) * (ISCSI_ISER_SG_TABLESIZE +1)), GFP_KERNEL); - if (!ib_conn->page_vec) { - ret = -ENOMEM; + if (!ib_conn->page_vec) goto alloc_err; - } + ib_conn->page_vec->pages = (u64 *) (ib_conn->page_vec + 1); params.page_shift = SHIFT_4K;