Skip to content

Commit

Permalink
x86, mce, therm_throt.c: Fix missing curly braces in error handling l…
Browse files Browse the repository at this point in the history
…ogic

When the feature PTS is not supported by CPU, the sysfile
package_power_limit_count for package should not be
generated.

This patch is used for fixing missing { and }.

The patch is not complete as there are other error handling
problems in this function - but that can wait until the
merge window.

Signed-off-by: Jin Dongming <[email protected]>
Reviewed-by: Fenghua Yu <[email protected]>
Acked-by: Jean Delvare <[email protected]>
Cc: Brown Len <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Hidetoshi Seto <[email protected]>
Cc: [email protected] <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Jin Dongming authored and Ingo Molnar committed Oct 8, 2010
1 parent 6b0cd00 commit b62be8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/kernel/cpu/mcheck/therm_throt.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,15 @@ static __cpuinit int thermal_throttle_add_dev(struct sys_device *sys_dev,
err = sysfs_add_file_to_group(&sys_dev->kobj,
&attr_core_power_limit_count.attr,
thermal_attr_group.name);
if (cpu_has(c, X86_FEATURE_PTS))
if (cpu_has(c, X86_FEATURE_PTS)) {
err = sysfs_add_file_to_group(&sys_dev->kobj,
&attr_package_throttle_count.attr,
thermal_attr_group.name);
if (cpu_has(c, X86_FEATURE_PLN))
err = sysfs_add_file_to_group(&sys_dev->kobj,
&attr_package_power_limit_count.attr,
thermal_attr_group.name);
}

return err;
}
Expand Down

0 comments on commit b62be8e

Please sign in to comment.