kernel-ark/drivers/usb/core
Jiri Slaby 2912282c06 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>
2009-09-23 06:46:37 -07:00
..
buffer.c
config.c USB: Fix SS endpoint companion descriptor parsing. 2009-09-23 06:46:18 -07:00
devices.c USB: add missing class descriptions used in usb/devices file 2009-07-12 15:16:39 -07:00
devio.c USB: increase usbdevfs max isoc buffer size 2009-09-23 06:46:33 -07:00
driver.c USB: make intf.pm_usage an atomic_t 2009-09-23 06:46:23 -07:00
endpoint.c driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
file.c Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
generic.c USB: add API for userspace drivers to "claim" ports 2009-09-23 06:46:22 -07:00
hcd-pci.c USB: new flag for resume-from-hibernation 2009-06-15 21:44:44 -07:00
hcd.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
hcd.h USB: fix the clear_tt_buffer interface 2009-07-12 15:16:38 -07:00
hub.c USB: don't lose mode switch events on suspended devices 2009-09-23 06:46:30 -07:00
hub.h USB: fix the clear_tt_buffer interface 2009-07-12 15:16:38 -07:00
inode.c const: mark remaining super_operations const 2009-09-22 07:17:24 -07:00
Kconfig Revert USB: usbfs: deprecate and hide option for !embedded 2009-07-12 15:16:39 -07:00
Makefile USB: add the usbfs devices file to debugfs 2009-06-15 21:44:43 -07:00
message.c USB: Let usb_sg_init to set transfer_buffer more often 2009-09-23 06:46:19 -07:00
notify.c
otg_whitelist.h
quirks.c
sysfs.c driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
urb.c USB: Support for bandwidth allocation. 2009-06-15 21:44:49 -07:00
usb.c USB: make usb_buffer_map_sg consistent with doc 2009-09-23 06:46:37 -07:00
usb.h USB: add API for userspace drivers to "claim" ports 2009-09-23 06:46:22 -07:00