diff options
| author | Roel Kluin <[email protected]> | 2009-01-02 16:32:55 +0000 |
|---|---|---|
| committer | James Bottomley <[email protected]> | 2009-01-02 18:16:38 +0000 |
| commit | a234b1103f7df35eacb1de7a9d15a636046e263b (patch) | |
| tree | d03973e328ed12a7b12057c7430bcf5d128ca105 /drivers/scsi/libsas/sas_host_smp.c | |
| parent | [SCSI] a2091, gvp11: kill warn_unused_result warnings (diff) | |
| download | kernel-a234b1103f7df35eacb1de7a9d15a636046e263b.tar.gz kernel-a234b1103f7df35eacb1de7a9d15a636046e263b.zip | |
[SCSI] libsas: fix test for negative unsigned and typos
unsigned req->data_len cannot be negative, and fix =-/-= typo
Signed-off-by: Roel Kluin <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
Diffstat (limited to 'drivers/scsi/libsas/sas_host_smp.c')
| -rw-r--r-- | drivers/scsi/libsas/sas_host_smp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/libsas/sas_host_smp.c b/drivers/scsi/libsas/sas_host_smp.c index 16f93123271e..d110a366c48a 100644 --- a/drivers/scsi/libsas/sas_host_smp.c +++ b/drivers/scsi/libsas/sas_host_smp.c @@ -199,8 +199,8 @@ int sas_smp_host_handler(struct Scsi_Host *shost, struct request *req, break; case SMP_DISCOVER: - req->data_len =- 16; - if (req->data_len < 0) { + req->data_len -= 16; + if ((int)req->data_len < 0) { req->data_len = 0; error = -EINVAL; goto out; @@ -215,8 +215,8 @@ int sas_smp_host_handler(struct Scsi_Host *shost, struct request *req, break; case SMP_REPORT_PHY_SATA: - req->data_len =- 16; - if (req->data_len < 0) { + req->data_len -= 16; + if ((int)req->data_len < 0) { req->data_len = 0; error = -EINVAL; goto out; @@ -238,8 +238,8 @@ int sas_smp_host_handler(struct Scsi_Host *shost, struct request *req, break; case SMP_PHY_CONTROL: - req->data_len =- 44; - if (req->data_len < 0) { + req->data_len -= 44; + if ((int)req->data_len < 0) { req->data_len = 0; error = -EINVAL; goto out; |
