acpi-power-meter: Don't leak ACPI error codes to userspace
authorDarrick J. Wong <djwong@us.ibm.com>
Thu, 22 Oct 2009 01:01:37 +0000 (18:01 -0700)
committerLen Brown <len.brown@intel.com>
Thu, 5 Nov 2009 17:25:39 +0000 (12:25 -0500)
If the ACPI methods return an error code, we must return -EINVAL to userspace
to flag the error.  Right now we pass the (positive) number right through,
which causes echo to keep writing bogus values.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>

No differences found