From: Heikki Krogerus Date: Thu, 8 Jan 2015 07:57:25 +0000 (+0200) Subject: ACPI / LPSS: check the result of ioremap() X-Git-Tag: firefly_0821_release~176^2~2247^2~1^3~4^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4483d59e29fe;p=firefly-linux-kernel-4.4.55.git 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 --- 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; }