OSDN Git Service

platform/x86: intel_ips: NULL check before some freeing functions is not needed
authorThomas Meyer <thomas@m3y3r.de>
Sun, 2 Dec 2018 20:52:11 +0000 (21:52 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Dec 2018 19:40:03 +0000 (21:40 +0200)
NULL check before some freeing functions is not needed.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_ips.c

index f37c07c..221c090 100644 (file)
@@ -1300,9 +1300,7 @@ static const struct file_operations ips_debugfs_ops = {
 
 static void ips_debugfs_cleanup(struct ips_driver *ips)
 {
-       if (ips->debug_root)
-               debugfs_remove_recursive(ips->debug_root);
-       return;
+       debugfs_remove_recursive(ips->debug_root);
 }
 
 static void ips_debugfs_init(struct ips_driver *ips)