From: kbuild test robot <fengguang.wu@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kbuild-all@01.org, linux-kernel@vger.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.
Date: Fri, 7 Jul 2017 07:44:10 +0800 [thread overview]
Message-ID: <201707070707.LPkIXYtZ%fengguang.wu@intel.com> (raw)
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
reply other threads:[~2017-07-06 23:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201707070707.LPkIXYtZ%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®