lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1268750962-13547-1-git-send-email-jslaby@suse.cz>
Date:	Tue, 16 Mar 2010 15:49:22 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	rolandd@...co.com
Cc:	linux-kernel@...r.kernel.org, jirislaby@...il.com,
	Or Gerlitz <ogerlitz@...taire.com>
Subject: [PATCH 1/1] infiniband: ulp/iser, fix error retval in iser_create_ib_conn_res

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@...e.cz>
Cc: Or Gerlitz <ogerlitz@...taire.com>
Cc: Roland Dreier <rolandd@...co.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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ