Commit 71f2d795 authored by Mika Westerberg's avatar Mika Westerberg Committed by Greg Kroah-Hartman

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

commit 98d28d0e upstream.

There is a typo, it should be negative -errno instead.
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fffa93ce
......@@ -128,7 +128,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment