From: Mika Westerberg Date: Fri, 12 Sep 2014 08:33:10 +0000 (+0300) Subject: ACPI / scan: Correct error return value of create_modalias() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=98d28d0e59160d2d6cb3f6a9050723ac40f89669;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ACPI / scan: Correct error return value of create_modalias() There is a typo, it should be negative -errno instead. Signed-off-by: Mika Westerberg Cc: All applicable Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 3bf7764659a4..d5e6ac5042d8 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -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;