diff options
| author | Greg Kroah-Hartman <[email protected]> | 2019-06-13 20:38:10 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2019-06-18 13:40:25 +0200 |
| commit | c008c6754c109fed660221e4d8b8194bbcd003ed (patch) | |
| tree | 18f160df8b1f22d60e1ce77d04cdf3bf96a49c81 | |
| parent | 72c9f26b583c54e89de386e0eb63398c07d95cfa (diff) | |
thermal: intel_powerclamp: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.
Cc: Zhang Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Finn Thain <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Daniel Lezcano <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/thermal/intel/intel_powerclamp.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c index ac7256b5f020..39c6b589f2ed 100644 --- a/drivers/thermal/intel/intel_powerclamp.c +++ b/drivers/thermal/intel/intel_powerclamp.c @@ -713,17 +713,9 @@ DEFINE_SHOW_ATTRIBUTE(powerclamp_debug); static inline void powerclamp_create_debug_files(void) { debug_dir = debugfs_create_dir("intel_powerclamp", NULL); - if (!debug_dir) - return; - - if (!debugfs_create_file("powerclamp_calib", S_IRUGO, debug_dir, - cal_data, &powerclamp_debug_fops)) - goto file_error; - return; - -file_error: - debugfs_remove_recursive(debug_dir); + debugfs_create_file("powerclamp_calib", S_IRUGO, debug_dir, cal_data, + &powerclamp_debug_fops); } static enum cpuhp_state hp_state; |