From: Julia Lawall Date: Fri, 1 May 2015 19:37:53 +0000 (+0200) Subject: staging: lustre: obdclass: obd_config: remove unneeded null test before free X-Git-Tag: omap-for-v4.3/legacy-v2-signed~121^2~929 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32a3fab2ed1ed7240514eb50506031e68dcd4a38;p=pandora-kernel.git staging: lustre: obdclass: obd_config: remove unneeded null test before free Kfree can cope with a null argument, so drop null tests. The semantic patch that identifies this issue is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // The first part of the patch introduces new labels to avoid unnecessary calls to kfree. In addition, lprof->lp_md is always null in the cleanup code at the end of the function, so that kfree is just dropped. Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed