]> git.baikalelectronics.ru Git - kernel.git/commit
usb: f_fs: fix ffs_epfile_io returning success on req alloc failure
authorMichal Nazarewicz <mina86@mina86.com>
Mon, 4 Jan 2016 20:28:34 +0000 (21:28 +0100)
committerFelipe Balbi <balbi@kernel.org>
Fri, 4 Mar 2016 13:14:31 +0000 (15:14 +0200)
commita00878a051d228a387d6b413b1f9f3b6d24b3c44
tree0411d4149db3bf8ecd68ead87d493de779ee74b2
parentdf11a067de9149ffc834642a6a1a3552416dc6da
usb: f_fs: fix ffs_epfile_io returning success on req alloc failure

In the AIO path, if allocating of a request failse, the function simply
goes to the error_lock path whose end result is returning value of ret.
However, at this point ret’s value is zero (assigned as return value from
ffs_mutex_lock).

Fix by adding ‘ret = -ENOMEM’ statement.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/function/f_fs.c