]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dmaengine: mv_xor: remove redundant null check on cd
authorColin Ian King <colin.king@canonical.com>
Wed, 1 Mar 2017 14:07:21 +0000 (14:07 +0000)
committerVinod Koul <vinod.koul@intel.com>
Tue, 14 Mar 2017 02:29:35 +0000 (07:59 +0530)
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>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/mv_xor.c

index 0cb951b743a6037cd6e4d0af05b1c63295e90dcd..ea53b879859c7f962fbf1bcb24057b73c3e35043 100644 (file)
@@ -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;