ACPI / LPSS: check the result of ioremap()
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Thu, 8 Jan 2015 07:57:25 +0000 (09:57 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 22 Jan 2015 00:20:02 +0000 (01:20 +0100)
If it fails we have to skip the device.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_lpss.c

index 4f3febf8a58954b2ca8ced8c057106529ab1f30b..d12f98abf8368e35cb980caa77f7e9c28da9b016 100644 (file)
@@ -340,6 +340,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
                                pdata->mmio_size = resource_size(&rentry->res);
                        pdata->mmio_base = ioremap(rentry->res.start,
                                                   pdata->mmio_size);
+                       if (!pdata->mmio_base)
+                               goto err_out;
                        break;
                }