From 4483d59e29fea65ef428be92a866aed50e28c795 Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Thu, 8 Jan 2015 09:57:25 +0200 Subject: [PATCH] ACPI / LPSS: check the result of ioremap() If it fails we have to skip the device. Signed-off-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_lpss.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 4f3febf8a589..d12f98abf836 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -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; } -- 2.34.1