staging: lustre: mdc: remove unneeded null test before free
Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
34b8fbd6cd
commit
6fa7cbab38
@ -1644,8 +1644,7 @@ out:
|
||||
llog_cat_close(NULL, llh);
|
||||
if (ctxt)
|
||||
llog_ctxt_put(ctxt);
|
||||
if (cs->cs_buf)
|
||||
kfree(cs->cs_buf);
|
||||
kfree(cs->cs_buf);
|
||||
kfree(cs);
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user