mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
USB: ohci-spear: Use devm_ioremap_resource()
Use devm_ioremap_resource() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3e2e714e7d
commit
09796be19a
1 changed files with 3 additions and 10 deletions
|
@ -81,17 +81,10 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
hcd->rsrc_start = pdev->resource[0].start;
|
hcd->rsrc_start = pdev->resource[0].start;
|
||||||
hcd->rsrc_len = resource_size(res);
|
hcd->rsrc_len = resource_size(res);
|
||||||
if (!devm_request_mem_region(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len,
|
|
||||||
hcd_name)) {
|
|
||||||
dev_dbg(&pdev->dev, "request_mem_region failed\n");
|
|
||||||
retval = -EBUSY;
|
|
||||||
goto err_put_hcd;
|
|
||||||
}
|
|
||||||
|
|
||||||
hcd->regs = devm_ioremap(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len);
|
hcd->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||||
if (!hcd->regs) {
|
if (IS_ERR(hcd->regs)) {
|
||||||
dev_dbg(&pdev->dev, "ioremap failed\n");
|
retval = PTR_ERR(hcd->regs);
|
||||||
retval = -ENOMEM;
|
|
||||||
goto err_put_hcd;
|
goto err_put_hcd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue