Skip to content

Commit

Permalink
ata: sata_dwc_460ex: remove redundant dev_err call
Browse files Browse the repository at this point in the history
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Wei Yongjun authored and Tejun Heo committed Jul 19, 2016
1 parent 37f92d7 commit 01c2920
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/ata/sata_dwc_460ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,8 @@ static int sata_dwc_dma_init_old(struct platform_device *pdev,
/* Get physical SATA DMA register base address */
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
hsdev->dma->regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(hsdev->dma->regs)) {
dev_err(&pdev->dev,
"ioremap failed for AHBDMA register address\n");
if (IS_ERR(hsdev->dma->regs))
return PTR_ERR(hsdev->dma->regs);
}

/* Initialize AHB DMAC */
return dw_dma_probe(hsdev->dma);
Expand Down Expand Up @@ -1227,11 +1224,8 @@ static int sata_dwc_probe(struct platform_device *ofdev)
/* Ioremap SATA registers */
res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&ofdev->dev, res);
if (IS_ERR(base)) {
dev_err(&ofdev->dev,
"ioremap failed for SATA register address\n");
if (IS_ERR(base))
return PTR_ERR(base);
}
dev_dbg(&ofdev->dev, "ioremap done for SATA register address\n");

/* Synopsys DWC SATA specific Registers */
Expand Down

0 comments on commit 01c2920

Please sign in to comment.