target: Fix ERR_PTR dereferencing bugs
authorDan Carpenter <error27@gmail.com>
Wed, 15 Jun 2011 16:41:33 +0000 (09:41 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 24 Jun 2011 00:03:27 +0000 (00:03 +0000)
commit552523dcbf0f33d44d816da310be8227a2c1502a
treeb3068ed11f76b583996b59f001d68bcc4be25156
parent233888644d80cc44330062e5e978c9e3a14c9cb9
target: Fix ERR_PTR dereferencing bugs

transport_init_session() and core_tmr_alloc_req() never return NULL,
they only return ERR_PTRs on error.

v2: Fix patch to return PTR_ERR(tl_nexus->se_sess) from Ankit Jain's
feedback.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Ankit Jain <jankit@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/loopback/tcm_loop.c
drivers/target/tcm_fc/tfc_sess.c