• Zhang Rui's avatar
    ACPI / resources: ignore invalid ACPI device resources · b355cee8
    Zhang Rui authored
    ACPI table may export resource entry with 0 length.
    But the current code interprets this kind of resource in a wrong way.
    It will create a resource structure with
    res->end = acpi_resource->start + acpi_resource->len - 1;
    
    This patch fixes a problem on my machine that a platform device fails
    to be created because one of its ACPI IO resource entry (start = 0,
    end = 0, length = 0) is translated into a generic resource with
    start = 0, end = 0xffffffff.
    Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
    Cc: All applicable <stable@vger.kernel.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    b355cee8
resource.c 15.1 KB