From 5347e3f509e5e381deb8fc69d1b52d9168d9e80c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 19 May 2009 16:41:09 +0000 Subject: [PATCH] Reverted r857 because the coding style of r856 is believed to be what is expected upstream instead of the coding style of r857. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@860 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 1912d9711..cbd82a00b 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -872,7 +872,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, struct srpt_ioctx *ioctx) NO_ADD_SENSE, srp_cmd->tag); ((struct srp_rsp *)ioctx->buf)->status = SAM_STAT_TASK_SET_FULL; - return -1; + goto send_rsp; } if (indirect_desc) { @@ -880,7 +880,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, struct srpt_ioctx *ioctx) NO_ADD_SENSE, srp_cmd->tag); ((struct srp_rsp *)ioctx->buf)->status = SAM_STAT_TASK_SET_FULL; - return -1; + goto send_rsp; } if (srp_cmd->buf_fmt & 0xf) @@ -900,7 +900,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, struct srpt_ioctx *ioctx) NO_ADD_SENSE, srp_cmd->tag); ((struct srp_rsp *)ioctx->buf)->status = SAM_STAT_TASK_SET_FULL; - return -1; + goto send_rsp; } ioctx->scmnd = scmnd; @@ -935,6 +935,9 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, struct srpt_ioctx *ioctx) scst_cmd_init_done(scmnd, scst_estimate_context()); return 0; + +send_rsp: + return -1; } /* @@ -961,7 +964,7 @@ static int srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch, if (!mgmt_ioctx) { srpt_build_tskmgmt_rsp(ch, ioctx, SRP_TSK_MGMT_FAILED, srp_tsk->tag); - return -1; + goto send_rsp; } mgmt_ioctx->ioctx = ioctx; @@ -1019,9 +1022,12 @@ static int srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch, srpt_build_tskmgmt_rsp(ch, ioctx, SRP_TSK_MGMT_FUNC_NOT_SUPP, srp_tsk->tag); - return -1; + goto send_rsp; } return 0; + +send_rsp: + return -1; } static void srpt_handle_new_iu(struct srpt_rdma_ch *ch,