TaskMgmt: Remove null pointer check

We do not need to check the pointer for null here since it is guaranteed
to never be.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2016-02-20 14:36:32 -08:00
parent b240bf1a2c
commit 0f886b7d3a

View File

@@ -221,10 +221,8 @@ iscsi_task_mgmt_sync_cb(struct iscsi_context *iscsi, int status,
{ {
struct iscsi_sync_state *state = private_data; struct iscsi_sync_state *state = private_data;
if (state != NULL) { state->status = status;
state->status = status; state->finished = 1;
state->finished = 1;
}
/* The task mgmt command might have completed successfully /* The task mgmt command might have completed successfully
* but the target might have responded with * but the target might have responded with
@@ -248,7 +246,7 @@ iscsi_task_mgmt_sync_cb(struct iscsi_context *iscsi, int status,
break; break;
} }
state->status = SCSI_STATUS_ERROR; state->status = SCSI_STATUS_ERROR;
} }
} }