summaryrefslogtreecommitdiff
path: root/drivers/usb/roles/intel-xhci-usb-role-switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/roles/intel-xhci-usb-role-switch.c')
-rw-r--r--drivers/usb/roles/intel-xhci-usb-role-switch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/roles/intel-xhci-usb-role-switch.c b/drivers/usb/roles/intel-xhci-usb-role-switch.c
index 58c1b60a33c1..de72eedb762e 100644
--- a/drivers/usb/roles/intel-xhci-usb-role-switch.c
+++ b/drivers/usb/roles/intel-xhci-usb-role-switch.c
@@ -145,8 +145,8 @@ static int intel_xhci_usb_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
data->base = devm_ioremap_nocache(dev, res->start, resource_size(res));
- if (IS_ERR(data->base))
- return PTR_ERR(data->base);
+ if (!data->base)
+ return -ENOMEM;
for (i = 0; i < ARRAY_SIZE(allow_userspace_ctrl_ids); i++)
if (acpi_dev_present(allow_userspace_ctrl_ids[i].hid, "1",