genirq/debugfs: No need to check return value of debugfs_create functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 15:21:49 +0000 (16:21 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 29 Jan 2019 19:04:21 +0000 (20:04 +0100)
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.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/20190122152151.16139-50-gregkh@linuxfoundation.org
kernel/irq/debugfs.c
kernel/irq/irqdomain.c

index 6f636136cccc05993e20034e92effc0c0fc3e7e2..bbd783a834098d9afad0bb6ce966ece081b6fe33 100644 (file)
@@ -256,8 +256,6 @@ static int __init irq_debugfs_init(void)
        int irq;
 
        root_dir = debugfs_create_dir("irq", NULL);
-       if (!root_dir)
-               return -ENOMEM;
 
        irq_domain_debugfs_init(root_dir);
 
index 8b0be4bd6565b3f3bd5fc49a006ac279c9fd9870..45c74373c7a430bf2c1fd0c657e6a72bcce52d2d 100644 (file)
@@ -1749,8 +1749,6 @@ void __init irq_domain_debugfs_init(struct dentry *root)
        struct irq_domain *d;
 
        domain_dir = debugfs_create_dir("domains", root);
-       if (!domain_dir)
-               return;
 
        debugfs_create_file("default", 0444, domain_dir, NULL,
                            &irq_domain_debug_fops);