forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/acpi/acpica/utids.c
....@@ -3,7 +3,7 @@
33 *
44 * Module Name: utids - support for device Ids - HID, UID, CID, SUB, CLS
55 *
6
- * Copyright (C) 2000 - 2018, Intel Corp.
6
+ * Copyright (C) 2000 - 2020, Intel Corp.
77 *
88 *****************************************************************************/
99
....@@ -263,8 +263,7 @@
263263 * 3) Size of the actual CID strings
264264 */
265265 cid_list_size = sizeof(struct acpi_pnp_device_id_list) +
266
- ((count - 1) * sizeof(struct acpi_pnp_device_id)) +
267
- string_area_size;
266
+ (count * sizeof(struct acpi_pnp_device_id)) + string_area_size;
268267
269268 cid_list = ACPI_ALLOCATE_ZEROED(cid_list_size);
270269 if (!cid_list) {
....@@ -289,9 +288,7 @@
289288 value);
290289 length = ACPI_EISAID_STRING_SIZE;
291290 } else { /* ACPI_TYPE_STRING */
292
-
293291 /* Copy the String CID from the returned object */
294
-
295292 strcpy(next_id_string, cid_objects[i]->string.pointer);
296293 length = cid_objects[i]->string.length + 1;
297294 }