usb: gadget: gadgetfs: fix an oops in ep_write()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 6 Jan 2015 10:19:21 +0000 (13:19 +0300)
committerFelipe Balbi <balbi@ti.com>
Sat, 10 Jan 2015 00:15:11 +0000 (18:15 -0600)
commit42d6cfa0caec4b68a7f17147fbf13a36e94a8bf2
treee5fd239238dde73f8db45bd9602cfee27917210b
parentc818a94c77a9980709197c53368aa83451fd659f
usb: gadget: gadgetfs: fix an oops in ep_write()

We try to free an ERR_PTR on this error path.

Fixes: b44be2462dbe ('usb: gadget: gadgetfs: Free memory allocated by memdup_user()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/legacy/inode.c