From: Colin Ian King Date: Wed, 3 May 2017 16:29:01 +0000 (+0100) Subject: scsi: pmcraid: remove redundant check to see if request_size is less than zero X-Git-Tag: v4.12-rc2~13^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b77b36cb7272ec5b9fb000e2ff18e947d9586a22;p=karo-tx-linux.git scsi: pmcraid: remove redundant check to see if request_size is less than zero 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 Reviewed-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index a4aadf5f4dc6..1cc814f1505a 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -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