linux/drivers/isdn
Peter Senna Tschudin 7f2e6a5d86 drivers/isdn/gigaset/common.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>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-13 17:05:17 -04:00
..
act2000 isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
capi isdn/capi: elliminate capincci_find() in non-middleware case 2012-05-07 22:37:57 -04:00
divert isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
gigaset drivers/isdn/gigaset/common.c: Remove useless kfree 2012-09-13 17:05:17 -04:00
hardware mISDN: Bugfix only few bytes are transfered on a connection 2012-07-29 23:18:30 -07:00
hisax ISDN: Add check for usb_alloc_urb() result 2012-07-18 09:40:54 -07:00
hysdn isdn/hysdn: Convert to kstrtoul_from_user 2012-04-15 03:23:31 -04:00
i4l TTY pull request for 3.5-rc1 2012-05-22 16:12:24 -07:00
icn isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
isdnloop isdnloop: fix and simplify isdnloop_init() 2012-08-03 16:53:22 -07:00
mISDN mISDN: Bugfix for layer2 fixed TEI mode 2012-08-06 13:22:50 -07:00
pcbit Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
sc isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
Kconfig
Makefile