The patch titled usb: imx_udc: fix leak in imx_ep_alloc_request() has been added to the -mm tree. Its filename is usb-imx_udc-fix-leak-in-imx_ep_alloc_request.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: usb: imx_udc: fix leak in imx_ep_alloc_request() From: Daniel Mack <daniel@xxxxxxxx> cppcheck found another leak in drivers/usb/gadget/imx_udc.c Cc: Mike Lee <eemike@xxxxxxxxx> Cc: Darius Augulis <augulis.darius@xxxxxxxxx> Signed-off-by: Daniel Mack <daniel@xxxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/usb/gadget/imx_udc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff -puN drivers/usb/gadget/imx_udc.c~usb-imx_udc-fix-leak-in-imx_ep_alloc_request drivers/usb/gadget/imx_udc.c --- a/drivers/usb/gadget/imx_udc.c~usb-imx_udc-fix-leak-in-imx_ep_alloc_request +++ a/drivers/usb/gadget/imx_udc.c @@ -734,9 +734,12 @@ static struct usb_request *imx_ep_alloc_ { struct imx_request *req; + if (!usb_ep) + return NULL; + req = kzalloc(sizeof *req, gfp_flags); - if (!req || !usb_ep) - return 0; + if (!req) + return NULL; INIT_LIST_HEAD(&req->queue); req->in_use = 0; _ Patches currently in -mm which might be from daniel@xxxxxxxx are origin.patch linux-next.patch usb-imx_udc-fix-leak-in-imx_ep_alloc_request.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html