Commit 6b64e1fe authored by Dan Carpenter's avatar Dan Carpenter Committed by Nicholas Bellinger

target: update error handling for sbc_setup_write_same()

We recently changed this to return positive subsystem error codes so the
error handling needs to be updated.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 3c989d76
...@@ -437,7 +437,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) ...@@ -437,7 +437,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
cmd->t_task_lba = get_unaligned_be64(&cdb[12]); cmd->t_task_lba = get_unaligned_be64(&cdb[12]);
ret = sbc_setup_write_same(cmd, &cdb[10], ops); ret = sbc_setup_write_same(cmd, &cdb[10], ops);
if (ret < 0) if (ret)
return ret; return ret;
break; break;
default: default:
...@@ -510,7 +510,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) ...@@ -510,7 +510,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
cmd->t_task_lba = get_unaligned_be64(&cdb[2]); cmd->t_task_lba = get_unaligned_be64(&cdb[2]);
ret = sbc_setup_write_same(cmd, &cdb[1], ops); ret = sbc_setup_write_same(cmd, &cdb[1], ops);
if (ret < 0) if (ret)
return ret; return ret;
break; break;
case WRITE_SAME: case WRITE_SAME:
...@@ -528,7 +528,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) ...@@ -528,7 +528,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
* of byte 1 bit 3 UNMAP instead of original reserved field * of byte 1 bit 3 UNMAP instead of original reserved field
*/ */
ret = sbc_setup_write_same(cmd, &cdb[1], ops); ret = sbc_setup_write_same(cmd, &cdb[1], ops);
if (ret < 0) if (ret)
return ret; return ret;
break; break;
case VERIFY: case VERIFY:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment