aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-08-22 20:24:49 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 06:46:37 -0700
commit2912282c06f219cf1634a624653c445329b37acf (patch)
tree43e2550ad8f4c1ec75dbdfe407c802f2148db67c /drivers/usb/gadget
parenta448c9d8c58ff7d3f8cc2a8f835065460099b22d (diff)
downloadkernel_samsung_smdk4412-2912282c06f219cf1634a624653c445329b37acf.zip
kernel_samsung_smdk4412-2912282c06f219cf1634a624653c445329b37acf.tar.gz
kernel_samsung_smdk4412-2912282c06f219cf1634a624653c445329b37acf.tar.bz2
USB: make usb_buffer_map_sg consistent with doc
usb_buffer_map_sg should return negative on error according to its documentation. But dma_map_sg returns 0 on error. Take this into account and return -ENOMEM in such situation. While at it, return -EINVAL instead of -1 when wrong input is passed in. If this wasn't done, usb_sg_* operations used after usb_sg_init which returned 0 may cause oopses/deadlocks since we don't init structures/entries, esp. completion and status entry. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
0 files changed, 0 insertions, 0 deletions