From: Heikki Krogerus Date: Thu, 8 Jan 2015 07:57:25 +0000 (+0200) Subject: ACPI / LPSS: check the result of ioremap() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4483d59e29fea65ef428be92a866aed50e28c795;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.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; }