usb: gadget: composite: Fix return value in case of error
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 16 Jul 2016 06:34:33 +0000 (08:34 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 11 Aug 2016 12:09:46 +0000 (15:09 +0300)
commit3887db5c2b6531c59e9649a4293071b575d6eb3b
tree250d34c06e41516fcceb1fe8e851b64fb84d5fad
parentbd610c5aa9fcc9817d2629274a27aab81aa77cec
usb: gadget: composite: Fix return value in case of error

In 'composite_os_desc_req_prepare', if one of the memory allocations fail,
0 will be returned, which means success.
We should return -ENOMEM instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/composite.c