ACPI / scan: Correct error return value of create_modalias()
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 12 Sep 2014 08:33:10 +0000 (11:33 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 22 Sep 2014 12:11:43 +0000 (14:11 +0200)
There is a typo, it should be negative -errno instead.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c

index 3bf7764..d5e6ac5 100644 (file)
@@ -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;