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>
This commit is contained in:
parent
0f33be009b
commit
98d28d0e59
|
@ -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) {
|
list_for_each_entry(id, &acpi_dev->pnp.ids, list) {
|
||||||
count = snprintf(&modalias[len], size, "%s:", id->id);
|
count = snprintf(&modalias[len], size, "%s:", id->id);
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
return EINVAL;
|
return -EINVAL;
|
||||||
if (count >= size)
|
if (count >= size)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
len += count;
|
len += count;
|
||||||
|
|
Loading…
Reference in New Issue