From: Julia Lawall Date: Fri, 13 May 2011 15:48:41 +0000 (+0200) Subject: drivers/staging/vt6656/main_usb.c: Delete unnecessary call to usb_kill_urb X-Git-Tag: v3.0-rc1~336^2~263 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17fb76165f307f7be2cfbc93958356fe50fa4791;p=pandora-kernel.git drivers/staging/vt6656/main_usb.c: Delete unnecessary call to usb_kill_urb Since in each case nothing has been done with the recently allocated urb, it is not necessary to kill it before freeing it. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression urb; statement S; position p1,p2; @@ urb = usb_alloc_urb@p1(...); ... when != urb if (urb == NULL) S ... when != urb usb_kill_urb@p2(urb); @other exists@ position r.p1,r.p2; @@ ... when != usb_alloc_urb@p1(...) usb_kill_urb@p2(...); @depends on !other exists@ expression urb; position r.p1,r.p2; @@ urb = usb_alloc_urb@p1(...); ... ( -usb_kill_urb@p2(urb); +usb_free_urb(urb); ... when != urb | -usb_kill_urb@p2(urb); ) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed