summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/at91_udc.c
diff options
context:
space:
mode:
authorJulia Lawall2011-05-13 17:30:46 +0200
committerGreg Kroah-Hartman2011-05-14 00:51:08 +0200
commitb0795bbf6dc6bd0a7a37d9d1ef4558e9e2b0acd6 (patch)
tree92e6f17971bf9c4ec0042c654f6a386b0286e051 /drivers/usb/gadget/at91_udc.c
parentUSB: s3c-hsotg: return proper error if clk_get fails (diff)
downloadkernel-qcow2-linux-b0795bbf6dc6bd0a7a37d9d1ef4558e9e2b0acd6.tar.gz
kernel-qcow2-linux-b0795bbf6dc6bd0a7a37d9d1ef4558e9e2b0acd6.tar.xz
kernel-qcow2-linux-b0795bbf6dc6bd0a7a37d9d1ef4558e9e2b0acd6.zip
drivers/usb/serial/opticon.c: Release resources on kmalloc failure
Several resources have been allocated before this kmalloc failure, and thus they should be released in this error handling code, as done in nearby error handling code. The semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression urb; statement S; position p1,p2; @@ urb = usb_alloc_urb@p1(...); ... when != urb if (urb == NULL) S ... when != urb ( return <+...urb...+>; | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ cocci.print_main("",p1) cocci.print_secs("",p2) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/at91_udc.c')
0 files changed, 0 insertions, 0 deletions