diff options
Diffstat (limited to 'drivers/usb/roles')
-rw-r--r-- | drivers/usb/roles/intel-xhci-usb-role-switch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/roles/intel-xhci-usb-role-switch.c b/drivers/usb/roles/intel-xhci-usb-role-switch.c index de72eedb762e..28102127b9d5 100644 --- a/drivers/usb/roles/intel-xhci-usb-role-switch.c +++ b/drivers/usb/roles/intel-xhci-usb-role-switch.c @@ -144,6 +144,8 @@ static int intel_xhci_usb_probe(struct platform_device *pdev) return -ENOMEM; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -EINVAL; data->base = devm_ioremap_nocache(dev, res->start, resource_size(res)); if (!data->base) return -ENOMEM; |