From 148e11349b0c9c7199fd3096254bd3ea16d59a05 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:22 +0100 Subject: usb: Convert to devm_ioremap_resource() Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding Acked-by: Alan Stern Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-nxp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/usb/host/ohci-nxp.c') diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c index 2344040..f4988fb 100644 --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c @@ -306,10 +306,9 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) goto out8; } - hcd->regs = devm_request_and_ioremap(&pdev->dev, res); - if (!hcd->regs) { - dev_err(&pdev->dev, "Failed to devm_request_and_ioremap\n"); - ret = -ENOMEM; + hcd->regs = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(hcd->regs)) { + ret = PTR_ERR(hcd->regs); goto out8; } hcd->rsrc_start = res->start; -- cgit v1.1