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

2010-10-01 Thread akpm
From: Jiri Slaby 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 Cc: Maxim Levitsky Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/IR/ene_ir.c |4 ++--

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

2010-10-01 Thread akpm
From: Andrew Morton It was missing the `break'. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=18672 Reported-by: Igor Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/video/cx23885/cx23885-core.c |1 + 1 file changed, 1 insertion(+) diff -puN drivers/m

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

2010-07-20 Thread akpm
From: Julia Lawall 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/) // @@ expression E1; @@ * mutex_lock(E1,...); <+... when != E1 if (...) { .

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

2010-07-20 Thread akpm
From: Andrew Morton 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 Cc: Patrick Boettcher Cc: Randy Dunlap Cc: Andreas Oberritter Signed-off-by: Andrew Morton --- drivers/media/

[patch 11/11] cx231xx: improve error handling

2010-04-27 Thread akpm
From: Dan Carpenter Return -EINVAL if we don't find the control id. Signed-off-by: Dan Carpenter Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Cc: Trent Piepho Cc: Douglas Schilling Landgraf Signed-off-by: Andrew Morton --- drivers/media/video/cx231xx/cx231xx-video.c |5 - 1 fil

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

2010-04-27 Thread akpm
From: Dan Carpenter The original code doesn't handle the situation where the controller is not found. Signed-off-by: Dan Carpenter Cc: Luca Risolia Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Signed-off-by: Andrew Morton --- drivers/media/video/et61x251/et61x251_core.c |6 -- 1

[patch 08/11] drivers/media/video/sn9c102/sn9c102_core.c: improve error handling

2010-04-27 Thread akpm
From: Dan Carpenter Return an error if the controller is not found. Signed-off-by: Dan Carpenter Cc: Luca Risolia Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Signed-off-by: Andrew Morton --- drivers/media/video/sn9c102/sn9c102_core.c |6 -- 1 file changed, 4 insertions(+), 2 de

[patch 06/11] drivers/media/video/zc0301/zc0301_core.c: improve error handling

2010-04-27 Thread akpm
From: Dan Carpenter Return an error if the controller is not found. Signed-off-by: Dan Carpenter Cc: Luca Risolia Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Signed-off-by: Andrew Morton --- drivers/media/video/zc0301/zc0301_core.c |6 -- 1 file changed, 4 insertions(+), 2 dele

[patch 09/11] cx88: improve error handling

2010-04-27 Thread akpm
From: Dan Carpenter Return -EINVAL if we don't find the right query control id. Signed-off-by: Dan Carpenter Cc: Mauro Carvalho Chehab Cc: Hans Verkuil Cc: Laurent Pinchart Signed-off-by: Andrew Morton --- drivers/media/video/cx88/cx88-video.c |5 - 1 file changed, 4 insertions(+)

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

2010-04-27 Thread akpm
From: Dan Carpenter The "AUVI_INPUT(tmp)" macro uses "tmp" as an index of an array with AU0828_MAX_INPUT elements. Signed-off-by: Dan Carpenter Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Cc: Hans Verkuil Signed-off-by: Andrew Morton --- drivers/media/video/au0828/au0828-video.c |2

[patch 04/11] drivers/media/video: avoid NULL dereference

2010-04-27 Thread akpm
From: Julia Lawall It seems impossible for ov to be NULL at this point. The semantic match that finds the problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression E, E1; identifier f; statement S1,S3; iterator iter; @@ if ((E == NULL && ...) || ...) { ... when != false (

[patch 03/11] dvb-usb: gp8psk, fix potential null derefernce

2010-04-27 Thread akpm
From: Jiri Slaby Stanse found that in gp8psk_load_bcm4500fw there is missing a check for return value of kmalloc. Add one and bail out appropriatelly. Signed-off-by: Jiri Slaby Cc: Alan Nisota Cc: Patrick Boettcher Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/d

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

2010-04-27 Thread akpm
From: Dan Carpenter 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. Signed-off-by: Dan

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

2010-04-27 Thread akpm
From: Randy Dunlap 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 and in 'make checkstack',

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

2010-04-27 Thread akpm
From: Randy Dunlap 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 and in 'make checkstack',

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

2010-03-11 Thread akpm
From: Randy Dunlap 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 and in 'make checkstack',

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

2010-03-11 Thread akpm
From: Randy Dunlap 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 and in 'make checkstack',

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

2010-03-11 Thread akpm
From: Andrew Morton 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 'cx23888_ir_rx_read': drivers/m

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

2010-03-11 Thread akpm
From: Yong Zhang Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy. Signed-off-by: Yong Zhang Cc: Brian Johnson Cc: Jean-Francois Moine Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/video/gspca/sn9c20x.c |2 +- 1 file changed, 1 insertion(+), 1 delet

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

2010-03-11 Thread akpm
From: Julia Lawall 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 assignment sh

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

2010-02-02 Thread akpm
From: Andrew Morton drivers/media/dvb/frontends/stv090x.c: In function 'stv090x_blind_search': drivers/media/dvb/frontends/stv090x.c:1967: warning: 'coarse_fail' may be used uninitialized in this function Cc: Manu Abraham Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/m

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

2010-02-02 Thread akpm
From: Andrew Morton Mad guess. Cc: Manu Abraham Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/dvb/frontends/stv090x.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/media/dvb/frontends/stv090x.c~drivers-media-dvb-frontends-stv090xc-fi

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

2010-02-02 Thread akpm
From: Richard Röjfors 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 is brought into reset state.

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

2010-02-02 Thread akpm
From: Andrew Morton 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 Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morto

[patch 1/7] drivers/media/video: move dereference after NULL test

2010-02-02 Thread akpm
From: Julia Lawall 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 assignment sh

[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 Add VIDEO_DEV as dependency of VIDEO_CAPTURE_DRIVERS and all of the devices listed under this setting. Signed-off-by: Mike Pagano Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/video/Kconfig | 20 ++-- 1 file changed, 10 insertio

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

2010-02-02 Thread akpm
From: Andrew Morton 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 Cc: Hans Verkuil Signed-off-by: Andrew Morton --- drivers/media/video/pms.c |

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

2009-12-21 Thread akpm
From: Julia Lawall 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 assignment sh

[patch 2/3] proc_fops: convert av7110

2009-12-21 Thread akpm
From: Alexey Dobriyan Drop S_IRUGO, proc entry doesn't contain read hooks. Drop S_IFREG, simply unnecessary. Signed-off-by: Alexey Dobriyan Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/dvb/ttpci/av7110_ir.c | 14 -- 1 file changed, 8 insertions(+),

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

2009-12-21 Thread akpm
From: Andrew Morton 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 Cc: Hans Verkuil Signed-off-by: Andrew Morton --- drivers/media/video/pms.c |

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

2009-11-17 Thread akpm
From: Alexander Strakh 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", sizeof(cam->input_physname));

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

2009-11-17 Thread akpm
From: Alexander Strakh 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", sizeof(cam->input_physname)

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

2009-11-17 Thread akpm
From: Roel Kluin Make id signed so we can't get an invalid pointer when we pass a negative id. Signed-off-by: Roel Kluin Cc: Mauro Carvalho Chehab Cc: Michael Krufky Signed-off-by: Andrew Morton --- drivers/media/dvb/siano/sms-cards.c |2 +- drivers/media/dvb/siano/sms-cards.h |2 +

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

2009-11-17 Thread akpm
From: Julia Lawall 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 assignment sh

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

2009-11-17 Thread akpm
From: Jonathan Corbet 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 Cc: Mauro Carvalho Chehab

[patch 1/1] video: initial support for ADV7180

2009-09-18 Thread akpm
From: Richard Röjfors This is an initial driver for Analog Devices ADV7180 Video Decoder. So far it only supports query standard. [a...@linux-foundation.org: remove unneeded cast] Signed-off-by: Richard Röjfors Cc: Mauro Carvalho Chehab Cc: Hans Verkuil Signed-off-by: Andrew Morton --- dr

[patch 2/9] drivers/media/video/cx88/cx88: add support for WinFast DTV2000H rev. J

2009-08-06 Thread akpm
From: Vlastimil Labsky I updated and simplyfied patch from Zbynek Hrabovsky for recent kernel. It enables autodetection of card, sound in analog TV , sound in FM radio and switching between antenna and cable RF input. Radio tuner still doesn't work, I don't even know how it works. Some guys wr

[patch 9/9] drivers/media/video/gspca: introduce missing kfree

2009-08-06 Thread akpm
From: Julia Lawall Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expressio

[patch 8/9] media/zr364xx: fix build errors

2009-08-06 Thread akpm
From: Randy Dunlap Fix build errors in zr364xx by adding selects: zr364xx.c:(.text+0x195ed7): undefined reference to `videobuf_streamon' zr364xx.c:(.text+0x196030): undefined reference to `videobuf_dqbuf' zr364xx.c:(.text+0x1960c4): undefined reference to `videobuf_qbuf' zr364xx.c:(.text+0x19612

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

2009-08-06 Thread akpm
From: Roel Kluin It tested the value of stk_sizes[i].m before checking whether i was in range. Signed-off-by: Roel Kluin Cc: Mauro Carvalho Chehab Cc: Hans Verkuil Cc: Trent Piepho Signed-off-by: Andrew Morton --- drivers/media/video/stk-webcam.c |4 ++-- 1 file changed, 2 insertions(

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

2009-08-06 Thread akpm
From: Julia Lawall 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: (http://www.emn.fr

[patch 5/9] drivers/media/video/bw-qcam.c: fix read buffer overflow

2009-08-06 Thread akpm
From: Roel Kluin parport[n] is checked before n < MAX_CAMS Signed-off-by: Roel Kluin Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/video/bw-qcam.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/media/video/bw-qcam.c~drivers-media-vide

[patch 4/9] siano: read buffer overflow

2009-08-06 Thread akpm
From: Roel Kluin With mode DEVICE_MODE_RAW_TUNER a read occurs past the end of smscore_fw_lkup[]. Subsequently an attempt is made to load the firmware from the resulting filename. Signed-off-by: Roel Kluin Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/dvb/siano/sm

[patch 1/9] video: initial support for ADV7180

2009-08-06 Thread akpm
From: Richard Röjfors This is an initial driver for Analog Devices ADV7180 Video Decoder. So far it only supports query standard. Signed-off-by: Richard Röjfors Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/video/Kconfig |9 + drivers/media/video/Makefile

[patch 3/9] media: strncpy does not null terminate string

2009-08-06 Thread akpm
From: Roel Kluin strlcpy() will always null terminate the string. Signed-off-by: Roel Kluin Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/dvb/dvb-usb/dvb-usb-i2c.c |2 +- drivers/media/video/pwc/pwc-v4l.c |2 +- drivers/media/video/zoran/zoran_card.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 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 uncommented but th

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

2009-06-10 Thread akpm
From: Roel Kluin With `while (try_count-- > 0)' try_count reaches -1 after the loop. Signed-off-by: Roel Kluin Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/media/video/tvp514x.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/media/video/tvp

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

2009-06-10 Thread akpm
From: Lennart Poettering 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 the ov511 driver: htt

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

2009-06-10 Thread akpm
From: Lennart Poettering 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 KEY_CAMERA. Some driv

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

2009-06-10 Thread akpm
From: Alessio Igor Bogani radio-mr800.c uses struct mutex, so while 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 Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/m

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

2009-06-10 Thread akpm
From: FUJITA Tomonori 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 #define dma_sync_sg dma

[patch 4/4] zoran: fix &&/|| error

2009-05-12 Thread akpm
From: Roel Kluin Fix &&/|| typo. `default_norm' can be 0 (PAL), 1 (NTSC) or 2 (SECAM), the condition tested was impossible. Signed-off-by: Roel Kluin Cc: Mauro Carvalho Chehab Cc: Hans Verkuil Signed-off-by: Andrew Morton --- drivers/media/video/zoran/zoran_card.c |2 +- 1 file changed

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

2009-05-12 Thread akpm
From: Roel Kluin binary/logical and typo Signed-off-by: Roel Kluin Cc: Mauro Carvalho Chehab Cc: Abylay Ospan Cc: Igor M. Liplianin Signed-off-by: Andrew Morton --- drivers/media/video/cx23885/cimax2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/media/video

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

2009-05-12 Thread akpm
From: Alessio Igor Bogani radio-mr800.c uses struct mutex, so while 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 Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton --- drivers/m

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

2009-05-12 Thread akpm
From: Simon Arlott 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 uncommented but th