mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
iser-target: Remove redundant check on the device
In iser_connect_release there is no chance that the iser device is set to NULL, if this happens we have a BUG. So use BUG_ON. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
c6b8e9180d
commit
57df81e3b1
1 changed files with 5 additions and 4 deletions
|
@ -797,7 +797,9 @@ isert_connect_release(struct isert_conn *isert_conn)
|
|||
|
||||
isert_dbg("conn %p\n", isert_conn);
|
||||
|
||||
if (device && device->use_fastreg)
|
||||
BUG_ON(!device);
|
||||
|
||||
if (device->use_fastreg)
|
||||
isert_conn_free_fastreg_pool(isert_conn);
|
||||
|
||||
isert_free_rx_descriptors(isert_conn);
|
||||
|
@ -814,10 +816,9 @@ isert_connect_release(struct isert_conn *isert_conn)
|
|||
if (isert_conn->login_buf)
|
||||
isert_free_login_buf(isert_conn);
|
||||
|
||||
kfree(isert_conn);
|
||||
isert_device_put(device);
|
||||
|
||||
if (device)
|
||||
isert_device_put(device);
|
||||
kfree(isert_conn);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue