aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_pr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/target_core_pr.c')
-rw-r--r--drivers/target/target_core_pr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 85564998500a..a1bcd927a9e6 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -2031,7 +2031,7 @@ static int __core_scsi3_write_aptpl_to_file(
2031 if (IS_ERR(file) || !file || !file->f_dentry) { 2031 if (IS_ERR(file) || !file || !file->f_dentry) {
2032 pr_err("filp_open(%s) for APTPL metadata" 2032 pr_err("filp_open(%s) for APTPL metadata"
2033 " failed\n", path); 2033 " failed\n", path);
2034 return (PTR_ERR(file) < 0 ? PTR_ERR(file) : -ENOENT); 2034 return IS_ERR(file) ? PTR_ERR(file) : -ENOENT;
2035 } 2035 }
2036 2036
2037 iov[0].iov_base = &buf[0]; 2037 iov[0].iov_base = &buf[0];
@@ -3818,7 +3818,7 @@ int target_scsi3_emulate_pr_out(struct se_cmd *cmd)
3818 " SPC-2 reservation is held, returning" 3818 " SPC-2 reservation is held, returning"
3819 " RESERVATION_CONFLICT\n"); 3819 " RESERVATION_CONFLICT\n");
3820 cmd->scsi_sense_reason = TCM_RESERVATION_CONFLICT; 3820 cmd->scsi_sense_reason = TCM_RESERVATION_CONFLICT;
3821 ret = EINVAL; 3821 ret = -EINVAL;
3822 goto out; 3822 goto out;
3823 } 3823 }
3824 3824
@@ -3828,7 +3828,8 @@ int target_scsi3_emulate_pr_out(struct se_cmd *cmd)
3828 */ 3828 */
3829 if (!cmd->se_sess) { 3829 if (!cmd->se_sess) {
3830 cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; 3830 cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
3831 return -EINVAL; 3831 ret = -EINVAL;
3832 goto out;
3832 } 3833 }
3833 3834
3834 if (cmd->data_length < 24) { 3835 if (cmd->data_length < 24) {