]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/base/core.c: Remove two unused variables and two useless calls to kfree
authorPeter Senna Tschudin <peter.senna@gmail.com>
Sat, 8 Dec 2012 17:38:06 +0000 (15:38 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 20:57:06 +0000 (12:57 -0800)
commit011c4e881900915a41581552d788bc4aa24d0742
treec9536774f9bd2c3ebb81467b090f46e6185ac52a
parenta0a651571b88773dbe9066f511188f44de089cd2
drivers/base/core.c: Remove two unused variables and two useless calls to kfree

old_class_name, and new_class_name are never used. This patch remove the
declaration and calls to kfree.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r1 forall@
type T; identifier i;
@@
* T *i = NULL;
  ... when != i
* kfree(i);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c