]> Git Repo - linux.git/commitdiff
scsi: pmcraid: remove redundant check to see if request_size is less than zero
authorColin Ian King <[email protected]>
Wed, 3 May 2017 16:29:01 +0000 (17:29 +0100)
committerMartin K. Petersen <[email protected]>
Tue, 9 May 2017 02:16:45 +0000 (22:16 -0400)
The 2nd check to see if request_size is less than zero is redundant
because the first check takes error exit path on this condition. So,
since it is redundant, remove it.

Detected by CoverityScan, CID#146149 ("Logically Dead Code")

Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: Tyrel Datwyler <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/pmcraid.c

index a4aadf5f4dc61e9d80a5f1382fd63f11d169dd0d..1cc814f1505a3c149133a0c8c5c2f5f556c056d4 100644 (file)
@@ -3770,9 +3770,6 @@ static long pmcraid_ioctl_passthrough(
                        pmcraid_err("couldn't build passthrough ioadls\n");
                        goto out_free_cmd;
                }
-       } else if (request_size < 0) {
-               rc = -EINVAL;
-               goto out_free_cmd;
        }
 
        /* If data is being written into the device, copy the data from user
This page took 0.072702 seconds and 4 git commands to generate.