From: Ezequiel Garcia Date: Thu, 17 Apr 2014 12:28:20 +0000 (-0300) Subject: [media] media: stk1160: Avoid stack-allocated buffer for control URBs X-Git-Tag: omap-for-v3.16/fixes-against-rc1~25^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85ac1a1772bb41da895bad83a81f6a62c8f293f6;p=pandora-kernel.git [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 Reported-by: Sander Eikelenboom Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Cc: stable@vger.kernel.org # for v3.7 and up Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed