linux-sg2042/drivers/input/misc
David Herrmann f40033acc2 Input: uinput - return -EINVAL when read buffer size is too small
Let's check whether the user-supplied buffer is actually big enough and
return -EINVAL if it is not. This differs from current behavior, which
caused 0 to be returned and actually does not make any sense, as
broken application will simply repeat the read getting into endless
loop.

Note that we treat 0 as a special case, according to the standard:

"Before any action described below is taken, and if nbyte is zero,
the read() function may detect and return errors as described below.
In the absence of errors, or if error detection is not performed,
the read() function shall return zero and have no other results."

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-08-21 22:29:53 -07:00
..
88pm860x_onkey.c mfd: Add ability to wake the system for 88pm860x 2012-03-06 18:46:49 +01:00
Kconfig mfd: Convert twl6040 to i2c driver, and separate it from twl core 2012-04-16 16:45:34 +02:00
Makefile Input: add driver support for MAX8997-haptic 2012-03-16 22:49:25 -07:00
ab8500-ponkey.c Input: ab8500-ponkey - add device tree support 2012-06-12 00:39:47 -07:00
ad714x-i2c.c Input: convert I2C drivers to use module_i2c_driver() 2012-03-16 23:06:19 -07:00
ad714x-spi.c Input: convert SPI drivers to use module_spi_driver() 2012-03-16 23:06:11 -07:00
ad714x.c Input: request threaded-only IRQs with IRQF_ONESHOT 2012-07-04 13:12:19 -07:00
ad714x.h Input: ad714x - read the interrupt status registers in a row 2011-08-22 09:59:26 -07:00
adxl34x-i2c.c Input: convert I2C drivers to use module_i2c_driver() 2012-03-16 23:06:19 -07:00
adxl34x-spi.c Input: convert SPI drivers to use module_spi_driver() 2012-03-16 23:06:11 -07:00
adxl34x.c Merge commit 'v3.2-rc3' into next 2011-11-29 01:51:07 -08:00
adxl34x.h Input: adxl34 - make enable/disable separate from suspend/resume 2010-07-03 13:13:21 -07:00
apanel.c
ati_remote2.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-01-10 10:55:52 -08:00
atlas_btns.c Input: atlas_btns - switch to using pr_err() and friends 2010-07-13 09:43:24 -07:00
bfin_rotary.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
bma150.c Input: convert I2C drivers to use module_i2c_driver() 2012-03-16 23:06:19 -07:00
cm109.c USB: input: cm109.c: fix up dev_* messages 2012-05-04 15:32:55 -07:00
cma3000_d0x.c Input: cma3000-d0x - remove unneeded checks 2012-04-20 23:07:39 -07:00
cma3000_d0x.h Input: add CMA3000 accelerometer driver 2010-11-30 23:05:21 -08:00
cma3000_d0x_i2c.c Input: convert I2C drivers to use module_i2c_driver() 2012-03-16 23:06:19 -07:00
cobalt_btns.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
da9052_onkey.c Input: da9052 - fix memory leak in da9052_onkey_probe() 2012-04-11 22:15:04 -07:00
dm355evm_keys.c Input: request threaded-only IRQs with IRQF_ONESHOT 2012-07-04 13:12:19 -07:00
gp2ap002a00f.c Input: synaptics_usb - switch to module_usb_driver() 2012-03-16 23:06:34 -07:00
gpio_tilt_polled.c Input: add generic GPIO-tilt driver 2011-11-30 23:41:16 -08:00
hp_sdc_rtc.c Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:49:54 -07:00
ixp4xx-beeper.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
keyspan_remote.c USB: input: keyspan_remote.c: fix up dev_* messages 2012-05-04 15:32:58 -07:00
kxtj9.c Input: convert I2C drivers to use module_i2c_driver() 2012-03-16 23:06:19 -07:00
m68kspkr.c
max8925_onkey.c Input: max8925_onkey - avoid accessing input device too early 2012-03-06 11:03:30 -08:00
max8997_haptic.c Input: add driver support for MAX8997-haptic 2012-03-16 22:49:25 -07:00
mc13783-pwrbutton.c Input: mc13783-pwrbutton - convert to use module_platform_driver() 2011-12-12 00:02:51 -08:00
mma8450.c Input: convert I2C drivers to use module_i2c_driver() 2012-03-16 23:06:19 -07:00
mpu3050.c Input: mpu3050 - set IRQF_ONESHOT when requesting the interrupt 2012-05-02 00:22:45 -07:00
pcap_keys.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
pcf8574_keypad.c Input: convert I2C drivers to use module_i2c_driver() 2012-03-16 23:06:19 -07:00
pcf50633-input.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
pcspkr.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
pm8xxx-vibrator.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
pmic8xxx-pwrkey.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
powermate.c USB: input: powermate.c: fix up dev_* messages 2012-05-04 15:33:00 -07:00
pwm-beeper.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
rb532_button.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
rotary_encoder.c Input: rotary-encoder - add DT bindings 2012-08-21 22:29:51 -07:00
sgi_btns.c Input: misc - use macro module_platform_driver() 2011-11-30 23:41:42 -08:00
sparcspkr.c dt/sparc: Eliminate users of of_platform_{,un}register_driver 2011-02-28 01:36:39 -07:00
twl4030-pwrbutton.c Input: twl4030-pwrbutton - report a wakeup_event on button press 2012-08-21 22:29:48 -07:00
twl4030-vibra.c Input: twl4030-vibra - really switch from #if to #ifdef 2012-03-12 22:18:54 -07:00
twl6040-vibra.c Input: twl6040-vibra - update for device tree support 2012-06-12 01:10:50 -07:00
uinput.c Input: uinput - return -EINVAL when read buffer size is too small 2012-08-21 22:29:53 -07:00
wistron_btns.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
wm831x-on.c mfd: Convert wm831x to irq_domain 2012-05-20 17:27:07 +02:00
xen-kbdfront.c Xen: consolidate and simplify struct xenbus_driver instantiation 2012-01-04 17:01:17 -05:00
yealink.c USB: input: yealink.c: fix up dev_* messages 2012-05-04 15:33:01 -07:00
yealink.h tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00