Skip to contentSkip to conversation

ACPI / scan: Correct error return value of create_modalias()

PATCH Applied Mika Westerberg 2 participants 2 messages Sep 12, 2014 – Sep 22, 2014 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI / scan: Correct error return value of create_modalias()

There is a typo, it should be negative -errno instead.

---
 drivers/acpi/scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/scan.c +1 -1
index 3bf7764659a4..d5e6ac5042d8 100644
@@ -130,7 +130,7 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias,
 	list_for_each_entry(id, &acpi_dev->pnp.ids, list) {
 		count = snprintf(&modalias[len], size, "%s:", id->id);
 		if (count < 0)
-			return EINVAL;
+			return -EINVAL;
 		if (count >= size)
 			return -ENOMEM;
 		len += count;
Signature · 1 line
2.1.0
#1 lore raw
Quoted 3 lines · Mika Westerberg

There is a typo, it should be negative -errno instead.

Queued up for 3.17-rc7, thanks!

Quoted 18 lines
---
 drivers/acpi/scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/scan.c +1 -1
index 3bf7764659a4..d5e6ac5042d8 100644
@@ -130,7 +130,7 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias,
 	list_for_each_entry(id, &acpi_dev->pnp.ids, list) {
 		count = snprintf(&modalias[len], size, "%s:", id->id);
 		if (count < 0)
-			return EINVAL;
+			return -EINVAL;
 		if (count >= size)
 			return -ENOMEM;
 		len += count;
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.