From: Colin Ian King Date: Wed, 1 Mar 2017 14:07:21 +0000 (+0000) Subject: dmaengine: mv_xor: remove redundant null check on cd X-Git-Tag: v4.14-rc1~944^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c3f4309a0e5d70d164c60cd160262db21cb050d;p=platform%2Fkernel%2Flinux-rpi.git dmaengine: mv_xor: remove redundant null check on cd 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 Signed-off-by: Vinod Koul --- 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;