diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index f42d21fba..c551d2343 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -426,7 +426,6 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu) } pdu->bhs_valid_bytes += rc; if (pdu->bhs_valid_bytes < ISCSI_BHS_LEN) { - *_pdu = NULL; return 0; } } @@ -446,7 +445,6 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu) pdu->ahs_valid_bytes += rc; if (pdu->ahs_valid_bytes < ahs_len) { - *_pdu = NULL; return 0; } } @@ -463,7 +461,6 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu) pdu->hdigest_valid_bytes += rc; if (pdu->hdigest_valid_bytes < ISCSI_DIGEST_LEN) { - *_pdu = NULL; return 0; } } @@ -484,7 +481,6 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu) } pdu->mobj = spdk_mempool_get(pool); if (pdu->mobj == NULL) { - *_pdu = NULL; return 0; } pdu->data_buf = pdu->mobj->buf; @@ -497,7 +493,6 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu) pdu->data_valid_bytes += rc; if (pdu->data_valid_bytes < data_len) { - *_pdu = NULL; return 0; } } @@ -514,7 +509,6 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu) pdu->ddigest_valid_bytes += rc; if (pdu->ddigest_valid_bytes < ISCSI_DIGEST_LEN) { - *_pdu = NULL; return 0; } } @@ -570,7 +564,6 @@ spdk_iscsi_read_pdu(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu **_pdu) return 1; error: - *_pdu = NULL; spdk_put_pdu(pdu); conn->pdu_in_progress = NULL; return SPDK_ISCSI_CONNECTION_FATAL;