Commit c6d413ce authored by Varka Bhadram's avatar Varka Bhadram Committed by Greg Kroah-Hartman

host: ohci-octeon: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource().
Signed-off-by: default avatarVarka Bhadram <varkab@cdac.in>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c36cc64
...@@ -120,12 +120,6 @@ static int ohci_octeon_drv_probe(struct platform_device *pdev) ...@@ -120,12 +120,6 @@ static int ohci_octeon_drv_probe(struct platform_device *pdev)
return -ENODEV; return -ENODEV;
} }
res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res_mem == NULL) {
dev_err(&pdev->dev, "No register space assigned\n");
return -ENODEV;
}
/* Ohci is a 32-bit device. */ /* Ohci is a 32-bit device. */
ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (ret) if (ret)
...@@ -135,14 +129,14 @@ static int ohci_octeon_drv_probe(struct platform_device *pdev) ...@@ -135,14 +129,14 @@ static int ohci_octeon_drv_probe(struct platform_device *pdev)
if (!hcd) if (!hcd)
return -ENOMEM; return -ENOMEM;
hcd->rsrc_start = res_mem->start; res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
hcd->rsrc_len = resource_size(res_mem);
reg_base = devm_ioremap_resource(&pdev->dev, res_mem); reg_base = devm_ioremap_resource(&pdev->dev, res_mem);
if (IS_ERR(reg_base)) { if (IS_ERR(reg_base)) {
ret = PTR_ERR(reg_base); ret = PTR_ERR(reg_base);
goto err1; goto err1;
} }
hcd->rsrc_start = res_mem->start;
hcd->rsrc_len = resource_size(res_mem);
ohci_octeon_hw_start(); ohci_octeon_hw_start();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment