Skip to contentSkip to conversation

pmcraid: remove unneeded check

PATCH In review Dan Carpenter 1 participant 1 message Dec 16, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pmcraid: remove unneeded check

request_size is zero here so this condition is always false. Also we already handled negative values some lines earlier so it's not negative for that reason as well.

It looks like Dan Rosenberg's fix was applied twice by mistake:
b5b515445f4 "[SCSI] pmcraid: reject negative request size" 5f6279da376 "[SCSI] pmcraid: reject negative request size"

drivers/scsi/pmcraid.c +0 -3
index 5163edb..d6bc4e6 100644
@@ -3870,9 +3870,6 @@ static long pmcraid_ioctl_passthrough(
 			pmcraid_err("couldn't build passthrough ioadls\n");
 			goto out_free_buffer;
 		}
-	} else if (request_size < 0) {
-		rc = -EINVAL;
-		goto out_free_buffer;
 	}
 
 	/* If data is being written into the device, copy the data from user