Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09796be1 authored by Jingoo Han's avatar Jingoo Han Committed by Greg Kroah-Hartman
Browse files

USB: ohci-spear: Use devm_ioremap_resource()



Use devm_ioremap_resource() to make cleanup paths simpler.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e2e714e
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -81,17 +81,10 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev)

	hcd->rsrc_start = pdev->resource[0].start;
	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);
	if (!hcd->regs) {
		dev_dbg(&pdev->dev, "ioremap failed\n");
		retval = -ENOMEM;
	hcd->regs = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(hcd->regs)) {
		retval = PTR_ERR(hcd->regs);
		goto err_put_hcd;
	}