[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201707070707.LPkIXYtZ%fengguang.wu@intel.com>
Date: Fri, 7 Jul 2017 07:44:10 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org
Subject: kernel/irq/irqdomain.c:1669:2-16: WARNING: NULL check before freeing
functions like kfree, debugfs_remove, debugfs_remove_recursive or
usb_free_urb is not needed. Maybe consider reorganizing relevant code to
avoid passing NULL values.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 90311148415ab23f5767fbb577a012d4405f12e5
commit: 087cdfb662ae50e3826e7cd2e54b6519d07b60f0 genirq/debugfs: Add proper debugfs interface
date: 2 weeks ago
coccinelle warnings: (new ones prefixed by >>)
>> kernel/irq/irqdomain.c:1669:2-16: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
vim +1669 kernel/irq/irqdomain.c
1653 .read = seq_read,
1654 .llseek = seq_lseek,
1655 .release = single_release,
1656 };
1657
1658 static void debugfs_add_domain_dir(struct irq_domain *d)
1659 {
1660 if (!d->name || !domain_dir || d->debugfs_file)
1661 return;
1662 d->debugfs_file = debugfs_create_file(d->name, 0444, domain_dir, d,
1663 &dfs_domain_ops);
1664 }
1665
1666 static void debugfs_remove_domain_dir(struct irq_domain *d)
1667 {
1668 if (d->debugfs_file)
> 1669 debugfs_remove(d->debugfs_file);
1670 }
1671
1672 void __init irq_domain_debugfs_init(struct dentry *root)
1673 {
1674 struct irq_domain *d;
1675
1676 domain_dir = debugfs_create_dir("domains", root);
1677 if (!domain_dir)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Powered by blists - more mailing lists