]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ACPI: fix create_modalias() return value handling
authorZhang Rui <rui.zhang@intel.com>
Tue, 14 Jan 2014 08:46:35 +0000 (16:46 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 16 Jan 2014 22:06:42 +0000 (23:06 +0100)
commit3d8e00909df96c2d3eace3996748be9c0a437e5a
tree97baef1d748eb49d303772026143d10b56652bdf
parent7e22e91102c6b9df7c4ae2168910e19d2bb14cd6
ACPI: fix create_modalias() return value handling

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@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c