Skip to content

Commit c008c67

Browse files
committed
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 <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Finn Thain <fthain@telegraphics.com.au> Cc: linux-pm@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 72c9f26 commit c008c67

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

‎drivers/thermal/intel/intel_powerclamp.c‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -713,17 +713,9 @@ DEFINE_SHOW_ATTRIBUTE(powerclamp_debug);
713713
static inline void powerclamp_create_debug_files(void)
714714
{
715715
debug_dir = debugfs_create_dir("intel_powerclamp", NULL);
716-
if (!debug_dir)
717-
return;
718-
719-
if (!debugfs_create_file("powerclamp_calib", S_IRUGO, debug_dir,
720-
cal_data, &powerclamp_debug_fops))
721-
goto file_error;
722716

723-
return;
724-
725-
file_error:
726-
debugfs_remove_recursive(debug_dir);
717+
debugfs_create_file("powerclamp_calib", S_IRUGO, debug_dir, cal_data,
718+
&powerclamp_debug_fops);
727719
}
728720

729721
static enum cpuhp_state hp_state;

0 commit comments

Comments
 (0)