linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:irq/core 30/72] kernel/irq/debugfs.c:192: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.
@ 2017-06-24  3:06 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2017-06-24  3:06 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: kbuild-all, linux-kernel, tipbuild

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
head:   8d9d51b62e8558bbc11c6b978acad001f9ea7a42
commit: 087cdfb662ae50e3826e7cd2e54b6519d07b60f0 [30/72] genirq/debugfs: Add proper debugfs interface


coccinelle warnings: (new ones prefixed by >>)

>> kernel/irq/debugfs.c:192: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 +192 kernel/irq/debugfs.c

   176	
   177	void irq_add_debugfs_entry(unsigned int irq, struct irq_desc *desc)
   178	{
   179		char name [10];
   180	
   181		if (!irq_dir || !desc || desc->debugfs_file)
   182			return;
   183	
   184		sprintf(name, "%d", irq);
   185		desc->debugfs_file = debugfs_create_file(name, 0444, irq_dir, desc,
   186							 &dfs_irq_ops);
   187	}
   188	
   189	void irq_remove_debugfs_entry(struct irq_desc *desc)
   190	{
   191		if (desc->debugfs_file)
 > 192			debugfs_remove(desc->debugfs_file);
   193	}
   194	
   195	static int __init irq_debugfs_init(void)
   196	{
   197		struct dentry *root_dir;
   198		int irq;
   199	
   200		root_dir = debugfs_create_dir("irq", NULL);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-24  3:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-24  3:06 [tip:irq/core 30/72] kernel/irq/debugfs.c:192: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 kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).