From: Andy Shevchenko Date: Wed, 5 Jun 2013 12:26:43 +0000 (+0300) Subject: dw_dmac: don't check resource with devm_ioremap_resource X-Git-Tag: next-20130617~70^2^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=058ba52d80d90da9763e37f4eabd74d5d5cff183;p=karo-tx-linux.git dw_dmac: don't check resource with devm_ioremap_resource devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Acked-by: Arnd Bergmann Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 724083d02b34..2b65ba614e60 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c @@ -1667,14 +1667,11 @@ static int dw_probe(struct platform_device *pdev) int err; int i; - io = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!io) - return -EINVAL; - irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; + io = platform_get_resource(pdev, IORESOURCE_MEM, 0); regs = devm_ioremap_resource(&pdev->dev, io); if (IS_ERR(regs)) return PTR_ERR(regs);