Re: [PATCH 1/4] ACPI: fix create_modalias() return value handling

From: Mika Westerberg
Date: Wed Jan 15 2014 - 09:55:51 EST


On Tue, Jan 14, 2014 at 04:46:35PM +0800, Zhang Rui wrote:
> Currently, create_modalias() handles the output truncated case in
> an improper way (return -EINVAL).
> Plus, acpi_device_uevent() and acpi_device_modalias_show() do
> improper check for the create_modalias() return value as well.
>
> This patch fixes create_modalias() to
> return -EINVAL if there is an output error,
> return -ENOMEM if the output is truncated,
> and also fixes both acpi_device_uevent() and acpi_device_modalias_show()
> to do proper return value check.
>
> Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>

Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/