linux/drivers/media/usb/stk1160
Ezequiel Garcia 85ac1a1772 [media] media: stk1160: Avoid stack-allocated buffer for control URBs
Currently stk1160_read_reg() uses a stack-allocated char to get the
read control value. This is wrong because usb_control_msg() requires
a kmalloc-ed buffer.

This commit fixes such issue by kmalloc'ating a 1-byte buffer to receive
the read value.

While here, let's remove the urb_buf array which was meant for a similar
purpose, but never really used.

Cc: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org      # for v3.7 and up
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-24 17:12:11 -03:00
..
Kconfig [media] stk1160: Build as a module if SND is m and audio support is selected 2013-08-01 14:55:25 -03:00
Makefile
stk1160-ac97.c [media] stk1160: warrant a NUL terminated string 2014-04-08 11:00:52 -03:00
stk1160-core.c [media] media: stk1160: Avoid stack-allocated buffer for control URBs 2014-05-24 17:12:11 -03:00
stk1160-i2c.c [media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg() 2012-10-28 16:41:54 -02:00
stk1160-reg.h
stk1160-v4l.c [media] v4l: subdev: Move [gs]_std operation to video ops 2014-05-24 17:11:26 -03:00
stk1160-video.c [media] stk1160: Replace BUG_ON with WARN_ON 2013-01-01 10:04:40 -02:00
stk1160.h [media] media: stk1160: Avoid stack-allocated buffer for control URBs 2014-05-24 17:12:11 -03:00