mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
ACPICA: fixup after acpi_get_object_info() change
Commit 15b8dd53f5 changed info->hardware_id from a static array to
a pointer. If hardware_id is non-NULL, it points to a NULL-terminated
string, so we don't need to terminate it explicitly. However, it may
be NULL; in that case, we *can't* add a NULL terminator.
This causes a NULL pointer dereference oops for devices without _HID.
Signed-off-by: Bjorn Helgaas <[email protected]>
CC: Lin Ming <[email protected]>
CC: Bob Moore <[email protected]>
CC: Gary Hade <[email protected]>
Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
53cddfcc0e
commit
b24715027a
1 changed files with 0 additions and 1 deletions
|
|
@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
|
|||
__func__, status);
|
||||
return retval;
|
||||
}
|
||||
info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0';
|
||||
|
||||
if (info->current_status && (info->valid & ACPI_VALID_HID) &&
|
||||
(!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue