summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@freescale.com>2015-11-27 10:21:27 +0800
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 11:02:25 -0600
commite5e71a9a5cfe63b57b1021dac901fc15e3ffd753 (patch)
treef6cbdb47de6969e5b314dd12a2b474ee32ee4955 /drivers/dma
parent8c736959525a58ed7f06d79ace0665a64eb7521e (diff)
MLK-11913 dma: pxp-v3: remove some duplicate dead code
The code slice in the pxp_probe() function: " if (!res || irq < 0) { err = -ENODEV; goto exit; } " appears twice closely. And the second code slice will become dead code which is never executed. So remove the second one. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/pxp/pxp_dma_v3.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v3.c b/drivers/dma/pxp/pxp_dma_v3.c
index 848285c8b6c9..f44045084958 100644
--- a/drivers/dma/pxp/pxp_dma_v3.c
+++ b/drivers/dma/pxp/pxp_dma_v3.c
@@ -4275,13 +4275,8 @@ static int pxp_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0);
- if (!res || irq < 0) {
- err = -ENODEV;
- goto exit;
- }
-
std_irq = platform_get_irq(pdev, 1);
- if (!res || irq < 0) {
+ if (!res || irq < 0 || std_irq < 0) {
err = -ENODEV;
goto exit;
}