Skip to content

Commit 434537b

Browse files
gregkhKAGA-KOKO
authored andcommitted
genirq/debugfs: 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. 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
1 parent 01cdfa9 commit 434537b

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

‎kernel/irq/debugfs.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ static int __init irq_debugfs_init(void)
256256
int irq;
257257

258258
root_dir = debugfs_create_dir("irq", NULL);
259-
if (!root_dir)
260-
return -ENOMEM;
261259

262260
irq_domain_debugfs_init(root_dir);
263261

‎kernel/irq/irqdomain.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,8 +1749,6 @@ void __init irq_domain_debugfs_init(struct dentry *root)
17491749
struct irq_domain *d;
17501750

17511751
domain_dir = debugfs_create_dir("domains", root);
1752-
if (!domain_dir)
1753-
return;
17541752

17551753
debugfs_create_file("default", 0444, domain_dir, NULL,
17561754
&irq_domain_debug_fops);

0 commit comments

Comments
 (0)