mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-07 14:56:44 +07:00
6f0fdc498e
Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e <= r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != &e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok && unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> |
||
---|---|---|
.. | ||
e4000_priv.h | ||
e4000.c | ||
e4000.h | ||
fc001x-common.h | ||
fc0011.c | ||
fc0011.h | ||
fc0012-priv.h | ||
fc0012.c | ||
fc0012.h | ||
fc0013-priv.h | ||
fc0013.c | ||
fc0013.h | ||
fc2580_priv.h | ||
fc2580.c | ||
fc2580.h | ||
Kconfig | ||
Makefile | ||
max2165_priv.h | ||
max2165.c | ||
max2165.h | ||
mc44s803_priv.h | ||
mc44s803.c | ||
mc44s803.h | ||
mt20xx.c | ||
mt20xx.h | ||
mt2060_priv.h | ||
mt2060.c | ||
mt2060.h | ||
mt2063.c | ||
mt2063.h | ||
mt2131_priv.h | ||
mt2131.c | ||
mt2131.h | ||
mt2266.c | ||
mt2266.h | ||
mxl5005s.c | ||
mxl5005s.h | ||
mxl5007t.c | ||
mxl5007t.h | ||
qt1010_priv.h | ||
qt1010.c | ||
qt1010.h | ||
tda827x.c | ||
tda827x.h | ||
tda8290.c | ||
tda8290.h | ||
tda9887.c | ||
tda9887.h | ||
tda18212.c | ||
tda18212.h | ||
tda18218_priv.h | ||
tda18218.c | ||
tda18218.h | ||
tda18271-common.c | ||
tda18271-fe.c | ||
tda18271-maps.c | ||
tda18271-priv.h | ||
tda18271.h | ||
tea5761.c | ||
tea5761.h | ||
tea5767.c | ||
tea5767.h | ||
tua9001_priv.h | ||
tua9001.c | ||
tua9001.h | ||
tuner-i2c.h | ||
tuner-simple.c | ||
tuner-simple.h | ||
tuner-types.c | ||
tuner-xc2028-types.h | ||
tuner-xc2028.c | ||
tuner-xc2028.h | ||
xc4000.c | ||
xc4000.h | ||
xc5000.c | ||
xc5000.h |