Skip to content

Commit

Permalink
dw_dmac: don't check resource with devm_ioremap_resource
Browse files Browse the repository at this point in the history
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Andy Shevchenko authored and Vinod Koul committed Jul 5, 2013
1 parent fed8c45 commit 0b95961
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/dma/dw_dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0b95961

Please sign in to comment.