diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index c4efbf1b1..24c1d2ca1 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -1403,7 +1403,7 @@ static int scsi_cmnd_start(struct iscsi_cmnd *req) if ((req_hdr->flags & ISCSI_CMD_READ) && (req_hdr->flags & ISCSI_CMD_WRITE)) { - int sz = cmnd_read_size(req); + int sz = cmnd_read_size(req); if (unlikely(sz < 0)) { PRINT_ERROR("%s", "BIDI data transfer, but initiator " "not supplied Bidirectional Read Expected Data " @@ -1535,7 +1535,7 @@ static int scsi_cmnd_start(struct iscsi_cmnd *req) goto out; } } - + req->target_task_tag = get_next_ttt(conn); if (dir != SCST_DATA_BIDI) { req->sg = scst_cmd_get_sg(scst_cmd); diff --git a/iscsi-scst/kernel/session.c b/iscsi-scst/kernel/session.c index 0cb15e531..cbf71bfb3 100644 --- a/iscsi-scst/kernel/session.c +++ b/iscsi-scst/kernel/session.c @@ -130,7 +130,7 @@ void sess_reinst_finished(struct iscsi_session *sess) int session_add(struct iscsi_target *target, struct iscsi_kern_session_info *info) { - struct iscsi_session *new_sess, *sess, *old_sess; + struct iscsi_session *new_sess = NULL, *sess, *old_sess; int err = 0; union iscsi_sid sid; bool reinstatement = false; diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index 172732bbf..82c6b36be 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -924,7 +924,7 @@ static int dev_user_exec(struct scst_cmd *cmd) ucmd->user_cmd.exec_cmd.data_direction = cmd->data_direction; ucmd->user_cmd.exec_cmd.partial = 0; ucmd->user_cmd.exec_cmd.timeout = cmd->timeout / HZ; - ucmd->user_cmd.exec_cmd.p_in_buf = ucmd->ubuff + + ucmd->user_cmd.exec_cmd.p_in_buf = ucmd->ubuff + (cmd->sg_cnt << PAGE_SHIFT); ucmd->user_cmd.exec_cmd.in_bufflen = cmd->in_bufflen; ucmd->user_cmd.exec_cmd.sn = cmd->tgt_sn; diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index cfddd3e73..f057e22a0 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -1014,7 +1014,7 @@ static struct scst_tgt_dev *scst_alloc_add_tgt_dev(struct scst_session *sess, struct scst_acg_dev *acg_dev) { int ini_sg, ini_unchecked_isa_dma, ini_use_clustering; - struct scst_tgt_dev *tgt_dev, *t; + struct scst_tgt_dev *tgt_dev, *t = NULL; struct scst_device *dev = acg_dev->dev; struct list_head *sess_tgt_dev_list_head; struct scst_tgt_template *vtt = sess->tgt->tgtt;