public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] infiniband: ulp/iser, fix error retval in iser_create_ib_conn_res
@ 2010-03-16 14:49 Jiri Slaby
  2010-03-16 23:52 ` Roland Dreier
  0 siblings, 1 reply; 8+ messages in thread
From: Jiri Slaby @ 2010-03-16 14:49 UTC (permalink / raw)
  To: rolandd; +Cc: linux-kernel, jirislaby, Or Gerlitz

Stanse foudn unreachable code in iser_create_ib_conn_res. Namely there
is switched goto and ret assignment. Switch them to make sense and
return ENOMEM in case of error.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Or Gerlitz <ogerlitz@voltaire.com>
Cc: Roland Dreier <rolandd@cisco.com>
---
 drivers/infiniband/ulp/iser/iser_verbs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 308d17b..6d4ba35 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -149,8 +149,8 @@ static int iser_create_ib_conn_res(struct iser_conn *ib_conn)
 
 	ib_conn->login_buf = kmalloc(ISER_RX_LOGIN_SIZE, GFP_KERNEL);
 	if (!ib_conn->login_buf) {
-		goto alloc_err;
 		ret = -ENOMEM;
+		goto alloc_err;
 	}
 
 	ib_conn->login_dma = ib_dma_map_single(ib_conn->device->ib_device,
-- 
1.7.0.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-05-06 13:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 14:49 [PATCH 1/1] infiniband: ulp/iser, fix error retval in iser_create_ib_conn_res Jiri Slaby
2010-03-16 23:52 ` Roland Dreier
2010-03-17 15:11   ` Dan Carpenter
2010-03-31 21:06     ` Roland Dreier
2010-04-01 15:38       ` Dan Carpenter
2010-04-02 11:27       ` [patch v3] " Dan Carpenter
2010-05-05 18:09         ` Roland Dreier
2010-05-06 13:22           ` Or Gerlitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox