summaryrefslogtreecommitdiff
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2014-09-12 12:33:10 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-22 16:11:43 +0400
commit98d28d0e59160d2d6cb3f6a9050723ac40f89669 (patch)
tree63565c7e6f05ee98649a509c62ecb72e66b43046 /drivers/acpi/scan.c
parent0f33be009b89d2268e94194dc4fd01a7851b6d51 (diff)
downloadlinux-98d28d0e59160d2d6cb3f6a9050723ac40f89669.tar.xz
ACPI / scan: Correct error return value of create_modalias()
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>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c2
1 files changed, 1 insertions, 1 deletions
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;