target: update error handling for sbc_setup_write_same()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 27 Nov 2012 14:27:01 +0000 (17:27 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 28 Nov 2012 06:49:21 +0000 (22:49 -0800)
We recently changed this to return positive subsystem error codes so the
error handling needs to be updated.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_sbc.c

index 39ced25b70cd462e08d8690c1eaf2e589c117891..94fd004ea3fcc982f2294bdf8c02abbf2b6726d6 100644 (file)
@@ -437,7 +437,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
                        cmd->t_task_lba = get_unaligned_be64(&cdb[12]);
 
                        ret = sbc_setup_write_same(cmd, &cdb[10], ops);
-                       if (ret < 0)
+                       if (ret)
                                return ret;
                        break;
                default:
@@ -510,7 +510,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
                cmd->t_task_lba = get_unaligned_be64(&cdb[2]);
 
                ret = sbc_setup_write_same(cmd, &cdb[1], ops);
-               if (ret < 0)
+               if (ret)
                        return ret;
                break;
        case WRITE_SAME:
@@ -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
                 */
                ret = sbc_setup_write_same(cmd, &cdb[1], ops);
-               if (ret < 0)
+               if (ret)
                        return ret;
                break;
        case VERIFY: