aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Vasilyev <pavel@pavlinux.ru>2012-06-05 04:02:05 (GMT)
committerAntti Palosaari <crope@iki.fi>2012-07-03 19:57:32 (GMT)
commitad65bc4e7d355050891bdb56f60c3d4cd046fa6e (patch)
treee0ba94f8e59375adba2e8e4512f8305207c4c63d
parentbe0861d72ca3ac9b35c37a03527e7e266630db73 (diff)
ACPI sysfs.c strlen fix
Current code is ignoring the last character of "enable" and "disable" in comparisons. https://bugzilla.kernel.org/show_bug.cgi?id=33732 Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index 9f66181..240a244 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -173,7 +173,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
{
int result = 0;
- if (!strncmp(val, "enable", strlen("enable") - 1)) {
+ if (!strncmp(val, "enable", strlen("enable"))) {
result = acpi_debug_trace(trace_method_name, trace_debug_level,
trace_debug_layer, 0);
if (result)
@@ -181,7 +181,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
goto exit;
}
- if (!strncmp(val, "disable", strlen("disable") - 1)) {
+ if (!strncmp(val, "disable", strlen("disable"))) {
int name = 0;
result = acpi_debug_trace((char *)&name, trace_debug_level,
trace_debug_layer, 0);

Privacy Policy