linux/drivers/staging/gdm72xx
Peter Senna Tschudin 47ad3428a1 drivers/staging/gdm72xx/gdm_sdio.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
..
gdm_qos.c staging/gdm72xx: remove camel-case vars in gdm_qos 2012-09-11 12:09:31 -07:00
gdm_qos.h staging/gdm72xx: remove camel-case vars in gdm_qos 2012-09-11 12:09:31 -07:00
gdm_sdio.c drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree 2012-09-12 09:43:45 -07:00
gdm_sdio.h
gdm_usb.c staging: gdm72xx: use list_move instead of list_del/list_add 2012-09-06 09:25:22 -07:00
gdm_usb.h
gdm_wimax.c staging: gdm72xx: fix reference counting in gdm_wimax_event_init 2012-08-13 19:18:39 -07:00
gdm_wimax.h staging/gdm72xx: Remove version.h includes 2012-06-12 10:34:47 -07:00
hci.h
Kconfig staging: gdm72xx depends on NET 2012-05-17 13:17:41 -07:00
Makefile
netlink_k.c Staging tree patches for 3.6-rc1 2012-07-26 11:14:49 -07:00
netlink_k.h
sdio_boot.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-08-01 10:26:23 -07:00
sdio_boot.h
TODO
usb_boot.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-08-01 10:26:23 -07:00
usb_boot.h
usb_ids.h
wm_ioctl.h