* [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero
@ 2017-05-03 16:29 Colin King
2017-05-04 19:46 ` Tyrel Datwyler
2017-05-09 2:18 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2017-05-03 16:29 UTC (permalink / raw)
To: James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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 <colin.king@canonical.com>
---
drivers/scsi/pmcraid.c | 3 ---
1 file changed, 3 deletions(-)
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
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero
2017-05-03 16:29 [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero Colin King
@ 2017-05-04 19:46 ` Tyrel Datwyler
2017-05-09 2:18 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Tyrel Datwyler @ 2017-05-04 19:46 UTC (permalink / raw)
To: Colin King, James E . J . Bottomley, Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
On 05/03/2017 09:29 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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 <colin.king@canonical.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero
2017-05-03 16:29 [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero Colin King
2017-05-04 19:46 ` Tyrel Datwyler
@ 2017-05-09 2:18 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-05-09 2:18 UTC (permalink / raw)
To: Colin King
Cc: James E . J . Bottomley, Martin K . Petersen, linux-scsi,
kernel-janitors, linux-kernel
Colin,
> 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.
Applied to 4.12/scsi-fixes.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-09 2:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 16:29 [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero Colin King
2017-05-04 19:46 ` Tyrel Datwyler
2017-05-09 2:18 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).