Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1590385 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-03-01 16:10 +0100 |
| Last post | 2017-03-14 03:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] engine: mv_xor: remove redundant null check on cd Colin King <colin.king@canonical.com> - 2017-03-01 16:10 +0100
Re: [PATCH] engine: mv_xor: remove redundant null check on cd Vinod Koul <vinod.koul@intel.com> - 2017-03-14 03:30 +0100
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-03-01 16:10 +0100 |
| Subject | [PATCH] engine: mv_xor: remove redundant null check on cd |
| Message-ID | <tge38-4N8-25@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
The check to see if cd is null is redundant, pdata->channels is
never null at this point, and hence &pdata->channels[i] cannot
be null, so remove the null check.
Detected by CoverityScan, CID#1357194 ("Logically Dead Code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/dma/mv_xor.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 0cb951b..ea53b87 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1580,11 +1580,6 @@ static int mv_xor_probe(struct platform_device *pdev)
int irq;
cd = &pdata->channels[i];
- if (!cd) {
- ret = -ENODEV;
- goto err_channel_add;
- }
-
irq = platform_get_irq(pdev, i);
if (irq < 0) {
ret = irq;
--
2.10.2
[toc] | [next] | [standalone]
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Date | 2017-03-14 03:30 +0100 |
| Message-ID | <tkKnM-1IQ-3@gated-at.bofh.it> |
| In reply to | #1590385 |
On Wed, Mar 01, 2017 at 02:07:21PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The check to see if cd is null is redundant, pdata->channels is
> never null at this point, and hence &pdata->channels[i] cannot
> be null, so remove the null check.
>
> Detected by CoverityScan, CID#1357194 ("Logically Dead Code")
Applied after fixing subsystem name
--
~Vinod
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web