Convert use 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 the explicit error code can be removed from the failure code path. Signed-off-by: Matthijs Kooijman <matthijs@xxxxxxxx> --- drivers/staging/dwc2/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) see 75096579c (lib: devres: Introduce devm_ioremap_resource()) diff --git a/drivers/staging/dwc2/pci.c b/drivers/staging/dwc2/pci.c index 6e4ee0f..acf2008 100644 --- a/drivers/staging/dwc2/pci.c +++ b/drivers/staging/dwc2/pci.c @@ -134,9 +134,9 @@ static int dwc2_driver_probe(struct pci_dev *dev, pci_set_power_state(dev, PCI_D0); hsotg->dev = &dev->dev; - hsotg->regs = devm_request_and_ioremap(&dev->dev, &dev->resource[0]); - if (!hsotg->regs) - return -ENOMEM; + hsotg->regs = devm_ioremap_resource(&dev->dev, &dev->resource[0]); + if (IS_ERR(hsotg->regs)) + return PTR_ERR(hsotg->regs); dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", (unsigned long)pci_resource_start(dev, 0), hsotg->regs); -- 1.8.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html