[PATCH] V4L/DVB: ir: fix memory leak
Free ir_dev before exit. Found by cppcheck. Signed-off-by: Alexander Beregalov a.berega...@gmail.com --- drivers/media/IR/ir-keytable.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index bff7a53..684918e 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c @@ -422,8 +422,10 @@ int ir_input_register(struct input_dev *input_dev, ir_dev-rc_tab.size = ir_roundup_tablesize(rc_tab-size); ir_dev-rc_tab.scan = kzalloc(ir_dev-rc_tab.size * sizeof(struct ir_scancode), GFP_KERNEL); - if (!ir_dev-rc_tab.scan) + if (!ir_dev-rc_tab.scan) { + kfree(ir_dev); return -ENOMEM; + } IR_dprintk(1, Allocated space for %d keycode entries (%zd bytes)\n, ir_dev-rc_tab.size, -- 1.6.6 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] V4L/DVB: pms: KERNEL_VERSION requires version.h
Fix this build error: drivers/media/video/pms.c:682: error: implicit declaration of function 'KERNEL_VERSION' Signed-off-by: Alexander Beregalov a.berega...@gmail.com --- drivers/media/video/pms.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c index 00228d5..a118bb1 100644 --- a/drivers/media/video/pms.c +++ b/drivers/media/video/pms.c @@ -35,6 +35,7 @@ #include media/v4l2-ioctl.h #include media/v4l2-device.h #include linux/mutex.h +#include linux/version.h #include asm/uaccess.h -- 1.6.5.3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [BUILD FAILURE 04/04] Next April 14 : x86_64 randconfig [drivers/media/video/cx231xx/cx231xx-alsa.ko]
2009/4/14 Subrata Modak subr...@linux.vnet.ibm.com: Observed the following build error: --- Kernel: arch/x86/boot/bzImage is ready (#1) Building modules, stage 2. MODPOST 578 modules ERROR: snd_pcm_period_elapsed [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! ERROR: snd_card_create [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! ERROR: snd_pcm_hw_constraint_integer [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! ERROR: snd_pcm_link_rwlock [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! ERROR: snd_pcm_set_ops [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! ERROR: snd_pcm_lib_ioctl [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! ERROR: snd_card_free [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! ERROR: snd_card_register [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! ERROR: snd_pcm_new [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 --- It is the same problem as #02. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] cx231xx: fix wrong usage of select in kconfig
VIDEO_CX231XX_ALSA depends on SND SND_PCM, but if we select it from VIDEO_CX231XX entry it does not automatically select SND_PCM. It causes build error: ERROR: snd_pcm_period_elapsed [drivers/media/video/cx231xx/cx231xx-alsa.ko] undefined! Documentation/kbuild/kconfig-language.txt: Note: select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. Signed-off-by: Alexander Beregalov a.berega...@gmail.com --- drivers/media/video/cx231xx/Kconfig |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/cx231xx/Kconfig b/drivers/media/video/cx231xx/Kconfig index 9115654..85ae751 100644 --- a/drivers/media/video/cx231xx/Kconfig +++ b/drivers/media/video/cx231xx/Kconfig @@ -6,7 +6,6 @@ config VIDEO_CX231XX select VIDEO_IR select VIDEOBUF_VMALLOC select VIDEO_CX25840 - select VIDEO_CX231XX_ALSA ---help--- This is a video4linux driver for Conexant 231xx USB based TV cards. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html