]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/libsas/sas_host_smp.c
[SCSI] libsas: fix test for negative unsigned and typos
[linux-2.6-omap-h63xx.git] / drivers / scsi / libsas / sas_host_smp.c
index 16f93123271e118d895fb2edaeea52a0addf49ad..d110a366c48a13f7e8372ac81c1a15de05c40efa 100644 (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;