diff options
| -rw-r--r-- | drivers/acpi/device_sysfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 545e91420cde..8940054d6250 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c | |||
| @@ -202,11 +202,15 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias, | |||
| 202 | { | 202 | { |
| 203 | struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; | 203 | struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; |
| 204 | const union acpi_object *of_compatible, *obj; | 204 | const union acpi_object *of_compatible, *obj; |
| 205 | acpi_status status; | ||
| 205 | int len, count; | 206 | int len, count; |
| 206 | int i, nval; | 207 | int i, nval; |
| 207 | char *c; | 208 | char *c; |
| 208 | 209 | ||
| 209 | acpi_get_name(acpi_dev->handle, ACPI_SINGLE_NAME, &buf); | 210 | status = acpi_get_name(acpi_dev->handle, ACPI_SINGLE_NAME, &buf); |
| 211 | if (ACPI_FAILURE(status)) | ||
| 212 | return -ENODEV; | ||
| 213 | |||
| 210 | /* DT strings are all in lower case */ | 214 | /* DT strings are all in lower case */ |
| 211 | for (c = buf.pointer; *c != '\0'; c++) | 215 | for (c = buf.pointer; *c != '\0'; c++) |
| 212 | *c = tolower(*c); | 216 | *c = tolower(*c); |
