Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/staging/rtl8192u
Peter Senna Tschudin 2e464f0068 drivers/staging/rtl8192u/r8192U_core.c: Remove useless kfree
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 09:43:45 -07:00
..
ieee80211 Staging: rtl8192u: using random_ether_addr() to generate random MAC 2012-09-04 14:11:29 -07:00
authors
changes
copying
dot11d.h
ieee80211_crypt.h
Kconfig
Makefile
r819xU_cmdpkt.c staging:rtl8192u Fix typos and comments 2012-05-01 21:50:58 -07:00
r819xU_cmdpkt.h
r819xU_firmware.c staging:rtl8192u Fix typos and comments 2012-05-01 21:50:58 -07:00
r819xU_firmware.h
r819xU_firmware_img.c
r819xU_firmware_img.h
r819xU_HTGen.h
r819xU_HTType.h staging: rtl8192u: Fix typo in staging/rtl8192u 2012-08-13 19:32:13 -07:00
r819xU_phy.c staging:rtl8192u Fix typos and comments 2012-05-01 21:50:58 -07:00
r819xU_phy.h
r819xU_phyreg.h staging: rtl8192u: Fix typo in staging/rtl8192u 2012-08-13 19:32:13 -07:00
r8180_93cx6.c staging: rtl8192u Fix a typo. 2012-05-01 21:50:09 -07:00
r8180_93cx6.h staging: rtl8192u Fix a typo. 2012-05-01 21:50:09 -07:00
r8180_pm.c
r8180_pm.h
r8190_rtl8256.c
r8190_rtl8256.h
r8192U.h staging: "rtl8192e/r8192u" typo change ContiuneDiffCount. 2012-05-01 21:52:12 -07:00
r8192U_core.c drivers/staging/rtl8192u/r8192U_core.c: Remove useless kfree 2012-09-12 09:43:45 -07:00
r8192U_dm.c staging: "rtl8192e/r8192u" typo change ContiuneDiffCount. 2012-05-01 21:52:12 -07:00
r8192U_dm.h
r8192U_hw.h staging: rtl8192u Fix a typo. 2012-05-01 21:50:09 -07:00
r8192U_wx.c staging: rtl8192u Fix a typo. 2012-05-01 21:50:09 -07:00
r8192U_wx.h staging: rtl8192u Fix a typo. 2012-05-01 21:50:09 -07:00