iscsi_queue_pdu() can never fail, make it void
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
14
lib/login.c
14
lib/login.c
@@ -1236,12 +1236,7 @@ iscsi_login_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
||||
pdu->callback = cb;
|
||||
pdu->private_data = private_data;
|
||||
|
||||
if (iscsi_queue_pdu(iscsi, pdu) != 0) {
|
||||
iscsi_set_error(iscsi, "Out-of-memory: failed to queue iscsi "
|
||||
"pdu.");
|
||||
iscsi->drv->free_pdu(iscsi, pdu);
|
||||
return -1;
|
||||
}
|
||||
iscsi_queue_pdu(iscsi, pdu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1587,12 +1582,7 @@ iscsi_logout_async(struct iscsi_context *iscsi, iscsi_command_cb cb,
|
||||
pdu->callback = cb;
|
||||
pdu->private_data = private_data;
|
||||
|
||||
if (iscsi_queue_pdu(iscsi, pdu) != 0) {
|
||||
iscsi_set_error(iscsi, "Out-of-memory: failed to queue iscsi "
|
||||
"logout pdu.");
|
||||
iscsi->drv->free_pdu(iscsi, pdu);
|
||||
return -1;
|
||||
}
|
||||
iscsi_queue_pdu(iscsi, pdu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user