Skip to content

Commit

Permalink
usb: chipidea: core: switch over to devm_ioremap_resource
Browse files Browse the repository at this point in the history
switch over to the newly added devm_ioremap_resource
which provides more consistent error messages.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Mar 30, 2013
1 parent bb36668 commit 1929081
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/usb/chipidea/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,9 @@ static int ci_hdrc_probe(struct platform_device *pdev)
return -ENODEV;
}

base = devm_request_and_ioremap(dev, res);
if (!base) {
dev_err(dev, "can't request and ioremap resource\n");
return -ENOMEM;
}
base = devm_ioremap_resource(dev, res);
if (IS_ERR(base))
return PTR_ERR(base);

ci = devm_kzalloc(dev, sizeof(*ci), GFP_KERNEL);
if (!ci) {
Expand Down

0 comments on commit 1929081

Please sign in to comment.