linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fs/ocfs2/aops.c:1881:2-7: 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.
@ 2016-03-28 17:12 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2016-03-28 17:12 UTC (permalink / raw)
  To: Ryan Ding
  Cc: kbuild-all, linux-kernel, Junxiao Bi, Andrew Morton,
	Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f55532a0c0b8bb6148f4e07853b876ef73bc69ca
commit: 4506cfb6f8cad594ac73e0df2b2961ca10dbd25e ocfs2: record UNWRITTEN extents when populate write desc
date:   3 days ago


coccinelle warnings: (new ones prefixed by >>)

>> fs/ocfs2/aops.c:1881:2-7: 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 +1881 fs/ocfs2/aops.c

  1865				ret = -ENOMEM;
  1866				goto out;
  1867			}
  1868			goto retry;
  1869		}
  1870		/* This direct write will doing zero. */
  1871		new->ue_cpos = desc->c_cpos;
  1872		new->ue_phys = desc->c_phys;
  1873		desc->c_clear_unwritten = 0;
  1874		list_add_tail(&new->ue_ip_node, &oi->ip_unwritten_list);
  1875		list_add_tail(&new->ue_node, &wc->w_unwritten_list);
  1876		new = NULL;
  1877	unlock:
  1878		spin_unlock(&oi->ip_lock);
  1879	out:
  1880		if (new)
> 1881			kfree(new);
  1882		return ret;
  1883	}
  1884	
  1885	/*
  1886	 * Populate each single-cluster write descriptor in the write context
  1887	 * with information about the i/o to be done.
  1888	 *
  1889	 * Returns the number of clusters that will have to be allocated, as

---
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:[~2016-03-28 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-28 17:12 fs/ocfs2/aops.c:1881:2-7: 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).