Merge branch 'pnp'

Merge a PNP change for 6.6-rc1:

 - Fix string truncation warning in pnpacpi_add_device() (Sunil V L).

* pnp:
  PNP: ACPI: Fix string truncation warning
This commit is contained in:
Rafael J. Wysocki 2023-08-25 20:57:06 +02:00
commit b483d3b8a5

View File

@ -254,6 +254,9 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
else
strncpy(dev->name, acpi_device_bid(device), sizeof(dev->name));
/* Handle possible string truncation */
dev->name[sizeof(dev->name) - 1] = '\0';
if (dev->active)
pnpacpi_parse_allocated_resource(dev);