Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1635127 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-05-03 18:30 +0200 |
| Last post | 2017-05-09 04:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero Colin King <colin.king@canonical.com> - 2017-05-03 18:30 +0200
Re: [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero Tyrel Datwyler <tyreld@linux.vnet.ibm.com> - 2017-05-04 21:50 +0200
Re: [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-05-09 04:20 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-05-03 18:30 +0200 |
| Subject | [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero |
| Message-ID | <tD5k6-7NI-21@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Tyrel Datwyler <tyreld@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-04 21:50 +0200 |
| Subject | Re: [PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero |
| Message-ID | <tDuVb-7WB-3@gated-at.bofh.it> |
| In reply to | #1635127 |
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>
[toc] | [prev] | [next] | [standalone]
| From | "Martin K. Petersen" <martin.petersen@oracle.com> |
|---|---|
| Date | 2017-05-09 04:20 +0200 |
| Message-ID | <tF2UN-3QW-1@gated-at.bofh.it> |
| In reply to | #1635127 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web