2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 11:13:58 +08:00

[SCSI] libsas: fix test for negative unsigned and typos

unsigned req->data_len cannot be negative, and fix =-/-= typo

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Roel Kluin 2009-01-02 17:32:55 +01:00 committed by James Bottomley
parent d38f47a977
commit a234b1103f

View File

@ -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;