diff mbox

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

Message ID 1410510790-21251-1-git-send-email-mika.westerberg@linux.intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Mika Westerberg Sept. 12, 2014, 8:33 a.m. UTC
There is a typo, it should be negative -errno instead.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/acpi/scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki Sept. 22, 2014, 2:03 p.m. UTC | #1
On Friday, September 12, 2014 11:33:10 AM Mika Westerberg wrote:
> There is a typo, it should be negative -errno instead.
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Queued up for 3.17-rc7, thanks!

> ---
>  drivers/acpi/scan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
>
diff mbox

Patch

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;