Merge branch 'irq/core' into irq/urgent
[platform/kernel/linux-starfive.git] / kernel / irq / irqdomain.c
index 1983f1b..aa5b7ee 100644 (file)
@@ -117,7 +117,7 @@ void irq_domain_free_fwnode(struct fwnode_handle *fwnode)
 {
        struct irqchip_fwid *fwid;
 
-       if (WARN_ON(!is_fwnode_irqchip(fwnode)))
+       if (!fwnode || WARN_ON(!is_fwnode_irqchip(fwnode)))
                return;
 
        fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
@@ -1997,7 +1997,7 @@ static void debugfs_add_domain_dir(struct irq_domain *d)
 
 static void debugfs_remove_domain_dir(struct irq_domain *d)
 {
-       debugfs_remove(debugfs_lookup(d->name, domain_dir));
+       debugfs_lookup_and_remove(d->name, domain_dir);
 }
 
 void __init irq_domain_debugfs_init(struct dentry *root)