[patch 1/2] dib3000mc: reduce large stack usage fix

2010-07-20 Thread akpm
From: Andrew Morton a...@linux-foundation.org s/ENODEV/ENOMEM, per Andreas. This fix got lost when someone merged dib3000mc: reduce large stack usage. Please don't lose fixes. Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Patrick Boettcher pboettc...@dibcom.fr Cc: Randy Dunlap

[patch 2/2] drivers/video/omap2/displays: add missing mutex_unlock

2010-07-20 Thread akpm
From: Julia Lawall ju...@diku.dk Add a mutex_unlock missing on the error paths. The use of the mutex is balanced elsewhere in the file. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @@ expression E1; @@ * mutex_lock(E1,...); +... when != E1

[patch 2/2] drivers/media/video/cx23885/cx23885-core.c: fix cx23885_dev_checkrevision()

2010-10-01 Thread akpm
From: Andrew Morton a...@linux-foundation.org It was missing the `break'. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=18672 Reported-by: Igor i2g...@gmail.com Cc: Mauro Carvalho Chehab mche...@infradead.org Signed-off-by: Andrew Morton a...@linux-foundation.org ---

[patch 1/2] drivers/media/IR/ene_ir.c: fix NULL dereference

2010-10-01 Thread akpm
From: Jiri Slaby jsl...@suse.cz When 'dev' allocation fails in ene_probe we jump to error label where we dereference the 'dev'. Fix it by jumping few lines below. Signed-off-by: Jiri Slaby jsl...@suse.cz Cc: Maxim Levitsky maximlevit...@gmail.com Cc: Mauro Carvalho Chehab mche...@redhat.com

[patch 3/4] dvb-core: fix potential mutex_unlock without mutex_lock in dvb_dvr_read

2009-05-12 Thread akpm
From: Simon Arlott si...@fire.lp0.eu dvb_dvr_read may unlock the dmxdev mutex and return -ENODEV, except this function is a file op and will never be called with the mutex held. There's existing mutex_lock and mutex_unlock around the actual read but it's commented out. These should probably be

[patch 1/4] radio-mr800.c: missing mutex include

2009-05-12 Thread akpm
From: Alessio Igor Bogani abog...@texware.it radio-mr800.c uses struct mutex, so while linux/mutex.h seems to be pulled in indirectly by one of the headers it already includes, the right thing is to include it directly. Signed-off-by: Alessio Igor Bogani abog...@texware.it Cc: Mauro Carvalho

[patch 2/4] V4L/DVB: cimax2.c: fix / typo

2009-05-12 Thread akpm
From: Roel Kluin roel.kl...@gmail.com binary/logical and typo Signed-off-by: Roel Kluin roel.kl...@gmail.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Abylay Ospan aos...@netup.ru Cc: Igor M. Liplianin liplia...@netup.ru Signed-off-by: Andrew Morton a...@linux-foundation.org ---

[patch 3/6] vino: replace dma_sync_single with dma_sync_single_for_cpu

2009-06-10 Thread akpm
From: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp This replaces dma_sync_single() with dma_sync_single_for_cpu() because dma_sync_single() is an obsolete API; include/linux/dma-mapping.h says: /* Backwards compat, remove in 2.7.x */ #define dma_sync_single dma_sync_single_for_cpu

[patch 1/6] radio-mr800.c: missing mutex include

2009-06-10 Thread akpm
From: Alessio Igor Bogani abog...@texware.it radio-mr800.c uses struct mutex, so while linux/mutex.h seems to be pulled in indirectly by one of the headers it already includes, the right thing is to include it directly. Signed-off-by: Alessio Igor Bogani abog...@texware.it Cc: Mauro Carvalho

[patch 5/6] v4l: generate KEY_CAMERA instead of BTN_0 key events on input devices

2009-06-10 Thread akpm
From: Lennart Poettering mzxre...@0pointer.de A bunch of V4L drivers generate BTN_0 instead of KEY_CAMERA key presses. X11 is able to handle KEY_CAMERA automatically these days while BTN_0 is not treated at all. Thus it would be of big benefit if the camera drivers would consistently generate

[patch 4/6] V4L/pwc: use usb_interface as parent, not usb_device

2009-06-10 Thread akpm
From: Lennart Poettering mzxre...@0pointer.de The current code creates a sysfs device path where the video4linux device is child of the usb device itself instead of the interface it belongs to. That is evil and confuses udev. This patch does basically the same thing as Kay's similar patch for

[patch 6/6] tvp514x: try_count off by one

2009-06-10 Thread akpm
From: Roel Kluin roel.kl...@gmail.com With `while (try_count-- 0)' try_count reaches -1 after the loop. Signed-off-by: Roel Kluin roel.kl...@gmail.com Cc: Mauro Carvalho Chehab mche...@infradead.org Signed-off-by: Andrew Morton a...@linux-foundation.org --- drivers/media/video/tvp514x.c |

[patch 2/6] dvb-core: fix potential mutex_unlock without mutex_lock in dvb_dvr_read

2009-06-10 Thread akpm
From: Simon Arlott si...@fire.lp0.eu dvb_dvr_read may unlock the dmxdev mutex and return -ENODEV, except this function is a file op and will never be called with the mutex held. There's existing mutex_lock and mutex_unlock around the actual read but it's commented out. These should probably be

[patch 5/5] dvb: make struct videobuf_queue_ops constant

2009-11-17 Thread akpm
From: Jonathan Corbet cor...@lwn.net The videobuf_queue_ops function vector is not declared constant, but there's no need for the videobuf layer to ever change it. Make it const so that videobuf users can make their operations const without warnings. Signed-off-by: Jonathan Corbet

[patch 3/5] drivers/media/video: Move dereference after NULL test

2009-11-17 Thread akpm
From: Julia Lawall ju...@diku.dk In quickcam_messenger.c, if the NULL test on uvd is needed, then the dereference should be after the NULL test. In vpif_display.c, std_info is initialized to the address of a structure field. This seems unlikely to be NULL. If it could somehow be NULL, then the

[patch 4/5] sms-cards: make id unsigned in sms_get_board()

2009-11-17 Thread akpm
From: Roel Kluin roel.kl...@gmail.com Make id signed so we can't get an invalid pointer when we pass a negative id. Signed-off-by: Roel Kluin roel.kl...@gmail.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Michael Krufky mkru...@kernellabs.com Signed-off-by: Andrew Morton

[patch 1/5] konicawc.c: possible buffer overflow while use strncat

2009-11-17 Thread akpm
From: Alexander Strakh str...@ispras.ru In driver ./drivers/media/video/usbvideo/konicawc.c in line 227: 227 usb_make_path(dev, cam-input_physname, sizeof(cam-input_physname)); After this line we use strncat: 228 strncat(cam-input_physname, /input0,

[patch 2/5] quickcam_messenger.c: possible buffer overflow while use strncat

2009-11-17 Thread akpm
From: Alexander Strakh str...@ispras.ru In driver ./drivers/media/video/usbvideo/quickcam_messenger.c in line 91: 91 usb_make_path(dev, cam-input_physname, sizeof(cam-input_physname)); After this line we use strncat: 92 strncat(cam-input_physname, /input0,

[patch 2/3] proc_fops: convert av7110

2009-12-21 Thread akpm
From: Alexey Dobriyan adobri...@gmail.com Drop S_IRUGO, proc entry doesn't contain read hooks. Drop S_IFREG, simply unnecessary. Signed-off-by: Alexey Dobriyan adobri...@gmail.com Cc: Mauro Carvalho Chehab mche...@infradead.org Signed-off-by: Andrew Morton a...@linux-foundation.org ---

[patch 3/3] drivers/media/video/pms.c needs version.h

2009-12-21 Thread akpm
From: Andrew Morton a...@linux-foundation.org i386 allmodconfig: drivers/media/video/pms.c: In function 'pms_querycap': drivers/media/video/pms.c:682: error: implicit declaration of function 'KERNEL_VERSION' Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Hans Verkuil hverk...@xs4all.nl

[patch 1/3] drivers/media/video: Move dereference after NULL test

2009-12-21 Thread akpm
From: Julia Lawall ju...@diku.dk In quickcam_messenger.c, if the NULL test on uvd is needed, then the dereference should be after the NULL test. In vpif_display.c, std_info is initialized to the address of a structure field. This seems unlikely to be NULL. If it could somehow be NULL, then the

[patch 02/11] dib7000p: reduce large stack usage

2010-04-27 Thread akpm
From: Randy Dunlap randy.dun...@oracle.com Reduce the static stack usage of one of the 2 top offenders as listed by 'make checkstack': Building with CONFIG_FRAME_WARN=2048 produces: drivers/media/dvb/frontends/dib7000p.c:1367: warning: the frame size of 2320 bytes is larger than 2048 bytes

[patch 01/11] dib3000mc: reduce large stack usage

2010-04-27 Thread akpm
From: Randy Dunlap randy.dun...@oracle.com Reduce the static stack usage of one of the 2 top offenders as listed by 'make checkstack': Building with CONFIG_FRAME_WARN=2048 produces: drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2224 bytes is larger than 2048 bytes

[patch 10/11] ir-keytable: avoid double lock

2010-04-27 Thread akpm
From: Dan Carpenter erro...@gmail.com It's possible that we wanted to resize to a smaller size but we didn't have enough memory to create the new table. We need to test for that here so we don't try to lock twice and dead lock. Also we free the oldkeymap on that path and that would be bad.

[patch 05/11] drivers/media/video/au0828/au0828-video.c: off by one bug

2010-04-27 Thread akpm
From: Dan Carpenter erro...@gmail.com The AUVI_INPUT(tmp) macro uses tmp as an index of an array with AU0828_MAX_INPUT elements. Signed-off-by: Dan Carpenter erro...@gmail.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Hans Verkuil

[patch 09/11] cx88: improve error handling

2010-04-27 Thread akpm
From: Dan Carpenter erro...@gmail.com Return -EINVAL if we don't find the right query control id. Signed-off-by: Dan Carpenter erro...@gmail.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Hans Verkuil hverk...@xs4all.nl Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com

[patch 07/11] drivers/media/video/et61x251/et61x251_core.c: improve error handling

2010-04-27 Thread akpm
From: Dan Carpenter erro...@gmail.com The original code doesn't handle the situation where the controller is not found. Signed-off-by: Dan Carpenter erro...@gmail.com Cc: Luca Risolia luca.riso...@studio.unibo.it Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Laurent Pinchart

[patch 11/11] cx231xx: improve error handling

2010-04-27 Thread akpm
From: Dan Carpenter erro...@gmail.com Return -EINVAL if we don't find the control id. Signed-off-by: Dan Carpenter erro...@gmail.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Trent Piepho xy...@speakeasy.org Cc: Douglas Schilling

[patch 3/7] drivers/media/video/Kconfig: add VIDEO_DEV dependency as needed in drivers/media/video/Kconfig

2010-02-02 Thread akpm
From: Mike Pagano mpag...@gentoo.org Add VIDEO_DEV as dependency of VIDEO_CAPTURE_DRIVERS and all of the devices listed under this setting. Signed-off-by: Mike Pagano mpag...@gentoo.org Cc: Mauro Carvalho Chehab mche...@infradead.org Signed-off-by: Andrew Morton a...@linux-foundation.org ---

[patch 2/7] drivers/media/video/pms.c needs version.h

2010-02-02 Thread akpm
From: Andrew Morton a...@linux-foundation.org i386 allmodconfig: drivers/media/video/pms.c: In function 'pms_querycap': drivers/media/video/pms.c:682: error: implicit declaration of function 'KERNEL_VERSION' Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Hans Verkuil hverk...@xs4all.nl

[patch 5/7] drivers/media/video/cx18/cx18-alsa-pcm.c: fix printk warning

2010-02-02 Thread akpm
From: Andrew Morton a...@linux-foundation.org drivers/media/video/cx18/cx18-alsa-pcm.c: In function 'cx18_alsa_announce_pcm_data': drivers/media/video/cx18/cx18-alsa-pcm.c:82: warning: format '%d' expects type 'int', but argument 5 has type 'size_t' Cc: Andy Walls awa...@radix.net Cc: Mauro

[patch 4/7] radio: add support for SAA7706H Car Radio DSP

2010-02-02 Thread akpm
From: Richard Röjfors richard.rojf...@pelagicore.com Initial support for the SAA7706H Car Radio DSP. It is a I2C device and currently the mute control is supported. When the device is unmuted it is brought out of reset and initiated using the proposed intialisation sequence. When muted the DSP

[patch 7/7] drivers/media/dvb/frontends/stv090x.c: fix use-uninitlalised

2010-02-02 Thread akpm
From: Andrew Morton a...@linux-foundation.org Mad guess. Cc: Manu Abraham m...@linuxtv.org Cc: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Andrew Morton a...@linux-foundation.org --- drivers/media/dvb/frontends/stv090x.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[patch 2/5] drivers/media/video: move dereference after NULL test

2010-03-11 Thread akpm
From: Julia Lawall ju...@diku.dk In quickcam_messenger.c, if the NULL test on uvd is needed, then the dereference should be after the NULL test. In vpif_display.c, std_info is initialized to the address of a structure field. This seems unlikely to be NULL. If it could somehow be NULL, then the

[patch 3/5] v4l/dvb: gspca - sn9c20x: correct onstack wait_queue_head declaration

2010-03-11 Thread akpm
From: Yong Zhang yong.zha...@gmail.com Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy. Signed-off-by: Yong Zhang yong.zha...@gmail.com Cc: Brian Johnson brij...@gmail.com Cc: Jean-Francois Moine moin...@free.fr Cc: Mauro Carvalho Chehab mche...@infradead.org Signed-off-by: Andrew

[patch 1/5] drivers/media/video/cx23885 needs kfifo conversion

2010-03-11 Thread akpm
From: Andrew Morton a...@linux-foundation.org linux-next: drivers/media/video/cx23885/cx23888-ir.c: In function 'cx23888_ir_irq_handler': drivers/media/video/cx23885/cx23888-ir.c:597: error: implicit declaration of function 'kfifo_put' drivers/media/video/cx23885/cx23888-ir.c: In function

[patch 5/5] dib7000p: reduce large stack usage

2010-03-11 Thread akpm
From: Randy Dunlap randy.dun...@oracle.com Reduce the static stack usage of one of the 2 top offenders as listed by 'make checkstack': Building with CONFIG_FRAME_WARN=2048 produces: drivers/media/dvb/frontends/dib7000p.c:1367: warning: the frame size of 2320 bytes is larger than 2048 bytes

[patch 4/5] dib3000mc: reduce large stack usage

2010-03-11 Thread akpm
From: Randy Dunlap randy.dun...@oracle.com Reduce the static stack usage of one of the 2 top offenders as listed by 'make checkstack': Building with CONFIG_FRAME_WARN=2048 produces: drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2224 bytes is larger than 2048 bytes

[patch 6/9] drivers/media/dvb: Use dst_type field instead of type_flags

2009-08-06 Thread akpm
From: Julia Lawall ju...@diku.dk It seems from other code that it is the dst_type field rather than the type_flags field that contains values of the form DST_TYPE_IS... The type_flags field contains values of the form DST_TYPE_HAS... The semantic match that finds this problem is as follows:

[patch 7/9] stk-webcam: read buffer overflow

2009-08-06 Thread akpm
From: Roel Kluin roel.kl...@gmail.com It tested the value of stk_sizes[i].m before checking whether i was in range. Signed-off-by: Roel Kluin roel.kl...@gmail.com Cc: Mauro Carvalho Chehab mche...@infradead.org Cc: Hans Verkuil hverk...@xs4all.nl Cc: Trent Piepho xy...@speakeasy.org