[PATCH 1/2] [media] rc: Fix double free in gpio_ir_recv_probe()

2012-10-28 Thread Jesper Juhl
rc_unregister_device(). That fixes the problem since rc_free_device() just does nothing if passed NULL and there's no further use of 'rcdev' after the call to rc_free_device() so it's not needed there. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/rc/gpio-ir-recv.c |2 +- 1 files

[PATCH 2/2] [media] rc: Fix double free in gpio_ir_recv_remove()

2012-10-28 Thread Jesper Juhl
Since rc_unregister_device() frees its argument there's no need to subsequently call rc_free_device() on the same variable - in fact it's a double free bug. Easily fixed by just removing the rc_free_device() call. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/rc/gpio-ir-recv.c

[PATCH] [media] s5p-tv: don't include linux/version.h in mixer_video.c

2012-10-18 Thread Jesper Juhl
The header is not needed, so remove it. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/platform/s5p-tv/mixer_video.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv

Re: [PATCH] [media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg()

2012-10-16 Thread Jesper Juhl
On Mon, 15 Oct 2012, Ezequiel Garcia wrote: On Mon, Oct 15, 2012 at 9:03 PM, Jesper Juhl j...@chaosbits.net wrote: On Mon, 15 Oct 2012, Ezequiel Garcia wrote: On Mon, Oct 15, 2012 at 7:52 PM, Jesper Juhl j...@chaosbits.net wrote: On Mon, 15 Oct 2012, Jesper Juhl wrote: On Sat, 13

Re: [PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-15 Thread Jesper Juhl
On Sat, 13 Oct 2012, Ezequiel Garcia wrote: On Sun, Nov 9, 2008 at 2:04 PM, Jesper Juhl j...@chaosbits.net wrote: There are two checks for 'rc' being less than zero with no change to 'rc' between the two, so the second is just dead code - remove it. Signed-off-by: Jesper Juhl j

[PATCH] [media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg()

2012-10-15 Thread Jesper Juhl
On Mon, 15 Oct 2012, Jesper Juhl wrote: On Sat, 13 Oct 2012, Ezequiel Garcia wrote: On Sun, Nov 9, 2008 at 2:04 PM, Jesper Juhl j...@chaosbits.net wrote: There are two checks for 'rc' being less than zero with no change to 'rc' between the two, so the second is just dead code - remove

Re: [PATCH] [media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg()

2012-10-15 Thread Jesper Juhl
On Mon, 15 Oct 2012, Ezequiel Garcia wrote: On Mon, Oct 15, 2012 at 7:52 PM, Jesper Juhl j...@chaosbits.net wrote: On Mon, 15 Oct 2012, Jesper Juhl wrote: On Sat, 13 Oct 2012, Ezequiel Garcia wrote: [...] Currently there are two checks for 'rc' being less than zero with no change

[PATCH] [media] stk1160: Remove dead code from stk1160_i2c_read_reg()

2012-10-12 Thread Jesper Juhl
There are two checks for 'rc' being less than zero with no change to 'rc' between the two, so the second is just dead code - remove it. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/usb/stk1160/stk1160-i2c.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff

[PATCH][Trivial][resend] Documentation: Add newline at end-of-file to files lacking one

2012-07-20 Thread Jesper Juhl
than on a new line. B) Some tools that process files line-by-line may get confused by the lack of a newline on the last line. C) The \ No newline at end of file line in diffs annoys me for some reason. So, let's just add the missing newline once and for all. Signed-off-by: Jesper Juhl j

[PATCH] [Trivial] Documentation: Add newline at end-of-file to files lacking one

2012-04-16 Thread Jesper Juhl
than on a new line. B) Some tools that process files line-by-line may get confused by the lack of a newline on the last line. C) The \ No newline at end of file line in diffs annoys me for some reason. So, let's just add the missing newline once and for all. Signed-off-by: Jesper Juhl j

[PATCH 03/26] [media] s2255drv: Remove redundant NULL test before release_firmware()

2012-04-09 Thread Jesper Juhl
release_firmware() tests for NULL pointers on its own - there's no reason to do an explicit check before calling the function. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/video/s2255drv.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media

[PATCH 20/26] [media] staging: as102: Remove redundant NULL check before release_firmware() and pointless comments

2012-04-09 Thread Jesper Juhl
that add no value. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/staging/media/as102/as102_fw.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/media/as102/as102_fw.c b/drivers/staging/media/as102/as102_fw.c index 43ebc43..9db275e 100644

[PATCH] staging/media/as102: Don't call release_firmware() on uninitialized variable

2012-03-24 Thread Jesper Juhl
- not good. The easy fix is to just initialize 'firmware' to NULL when we declare it, since release_firmware() deals gracefully with being passed NULL pointers. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/staging/media/as102/as102_fw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] media, cx231xx: Fix double free on close

2012-03-04 Thread Jesper Juhl
of cx231xx_release_resources() since it is pointless. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/video/cx231xx/cx231xx-cards.c |1 - drivers/media/video/cx231xx/cx231xx-video.c |6 ++ 2 files changed, 2 insertions(+), 5 deletions(-) Please note that I do not have hardware

[PATCH][trivial] media, DiB0090: remove redundant ';' from dib0090_fw_identify()

2012-02-26 Thread Jesper Juhl
One semi-colon is enough. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/dvb/frontends/dib0090.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb/frontends/dib0090.c b/drivers/media/dvb/frontends/dib0090.c index 224d81e..d9fe60b 100644

Re: [PATCH] tm6000: Don't use pointer after freeing it in tm6000_ir_fini()

2012-02-09 Thread Jesper Juhl
On Mon, 6 Feb 2012, Thierry Reding wrote: * Jesper Juhl wrote: In tm6000_ir_fini() there seems to be a problem. rc_unregister_device(ir-rc); calls rc_free_device() on the pointer it is given, which frees it. Subsequently the function does: if (!ir-polling

[PATCH] media, adp1653: Remove unneeded include of version.h from drivers/media/video/adp1653.c

2012-02-02 Thread Jesper Juhl
Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/video/adp1653.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) compile tested only. diff --git a/drivers/media/video/adp1653.c b/drivers/media/video/adp1653.c index 12eedf4..badbdb6 100644 --- a/drivers/media/video

[PATCH] staging, media, easycap: Fix mem leak in easycap_usb_probe()

2012-01-29 Thread Jesper Juhl
. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/staging/media/easycap/easycap_main.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) compile tested only diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c index 8ff5f38

[PATCH] tm6000: Don't use pointer after freeing it in tm6000_ir_fini()

2012-01-28 Thread Jesper Juhl
have a means to test it, so beyond testing that the change compiles it has seen no testing what-so-ever. Anyway, here's a proposed patch. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/video/tm6000/tm6000-input.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff

[PATCH] drivers/media/dvb/frontends/drxk_hard.c does not need to include linux/version.h

2012-01-23 Thread Jesper Juhl
This patch removes the unneeded include. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/dvb/frontends/drxk_hard.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) compile tested only diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends

[PATCH] Remove pointless linux/version.h include from drivers/media/dvb/frontends/tda18271c2dd.c

2012-01-15 Thread Jesper Juhl
As pointed out by 'make versioncheck', there's no need for drivers/media/dvb/frontends/tda18271c2dd.c to #include linux/version.h, so this patch removes the include. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/dvb/frontends/tda18271c2dd.c |1 - 1 files changed, 0

[PATCH][Resend] Remove unneeded version.h includes from include/

2011-08-01 Thread Jesper Juhl
-ioctl.h index 0f19779..1ed1e61 100644 --- a/include/media/pwc-ioctl.h +++ b/include/media/pwc-ioctl.h @@ -53,7 +53,6 @@ */ #include linux/types.h -#include linux/version.h /* Enumeration of image sizes */ #define PSZ_SQCIF 0x00 -- 1.7.6 -- Jesper Juhl j...@chaosbits.net http

[PATCH][Resend] viacam: Don't explode if pci_find_bus() returns NULL

2011-08-01 Thread Jesper Juhl
In the unlikely case that pci_find_bus() should return NULL viacam_serial_is_enabled() is going to dereference a NULL pointer and blow up. Better safe than sorry, so be defensive and check the pointer. Signed-off-by: Jesper Juhl j...@chaosbits.net Acked-by: Jonathan Corbet cor...@lwn.net

Re: Hauppauge model 73219 rev D1F5 tuner doesn't detect signal, older rev D1E9 works

2011-07-21 Thread Jesper Juhl
On Tue, 19 Jul 2011, Michael Krufky wrote: On Tue, Jul 19, 2011 at 3:37 AM, Jesper Juhl j...@chaosbits.net wrote: Hi I have a bunch of Hauppauge HVR-1900 model 73219's, some are revision D1E9 and work perfectly, but with the newer revision D1F5's the tuner fails to detect a signal

Re: Hauppauge model 73219 rev D1F5 tuner doesn't detect signal, older rev D1E9 works

2011-07-21 Thread Jesper Juhl
On Thu, 21 Jul 2011, Jesper Juhl wrote: On Tue, 19 Jul 2011, Michael Krufky wrote: On Tue, Jul 19, 2011 at 3:37 AM, Jesper Juhl j...@chaosbits.net wrote: Hi I have a bunch of Hauppauge HVR-1900 model 73219's, some are revision D1E9 and work perfectly, but with the newer revision

Hauppauge model 73219 rev D1F5 tuner doesn't detect signal, older rev D1E9 works

2011-07-19 Thread Jesper Juhl
with and if there's any further information you need from me in order to get an idea about what the problem is, then just ask. Please CC me on replies since I'm not subscribed to the linux-media list. -- Jesper Juhl j...@chaosbits.net http://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon

Re: FW: [PATCH] drivers: support new Siano tuner devices.

2011-07-19 Thread Jesper Juhl
at http://www.tux.org/lkml/ -- Jesper Juhl j...@chaosbits.net http://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

Re: Hauppauge model 73219 rev D1F5 tuner doesn't detect signal, older rev D1E9 works

2011-07-19 Thread Jesper Juhl
On Tue, 19 Jul 2011, Michael Krufky wrote: On Tue, Jul 19, 2011 at 3:37 AM, Jesper Juhl j...@chaosbits.net wrote: ... I can test any patches you may come up with and if there's any further information you need from me in order to get an idea about what the problem is, then just ask

[PATCH] media, Micronas dvb-t: Fix mem leaks, don't needlessly zero mem, fix spelling

2011-07-13 Thread Jesper Juhl
-by: Jesper Juhl j...@chaosbits.net --- drivers/media/dvb/frontends/drxd_hard.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c index f132e49..0266a83 100644 --- a/drivers/media/dvb

[PATCH] viacam: Don't explode if pci_find_bus() returns NULL

2011-07-03 Thread Jesper Juhl
In the unlikely case that pci_find_bus() should return NULL viacam_serial_is_enabled() is going to dereference a NULL pointer and blow up. Better safe than sorry, so be defensive and check the pointer. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/video/via-camera.c |2

[PATCH 03/37] Remove unneeded version.h includes from include/

2011-06-23 Thread Jesper Juhl
It was pointed out by 'make versioncheck' that some includes of linux/version.h were not needed in include/. This patch removes them. Signed-off-by: Jesper Juhl j...@chaosbits.net --- include/linux/ceph/messenger.h |1 - include/media/pwc-ioctl.h |1 - 2 files changed, 0 insertions

[PATCH 10/37] Remove unneeded version.h includes from drivers/media/dvb/

2011-06-23 Thread Jesper Juhl
It was pointed out by 'make versioncheck' that some includes of linux/version.h are not needed in drivers/media/dvb/. This patch removes them. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/dvb/frontends/drxd_hard.c |1 - drivers/media/dvb/siano/smscoreapi.h|1 - 2

[PATCH 11/37] Remove unneeded version.h includes (and add where needed) for drivers/media/radio/

2011-06-23 Thread Jesper Juhl
It was pointed out by 'make versioncheck' that linux/version.h was not always being included where needed and sometimes included needlessly in drivers/media/radio/. This patch fixes up the includes. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/radio/si470x/radio-si470x-i2c.c

[PATCH 12/37] Remove unneeded version.h includes (and add where needed) for drivers/media/video/

2011-06-23 Thread Jesper Juhl
It was pointed out by 'make versioncheck' that linux/version.h was not always being included where needed and sometimes included needlessly in drivers/media/video/. This patch fixes up the includes. Signed-off-by: Jesper Juhl j...@chaosbits.net --- drivers/media/video/cpia2/cpia2.h

[PATCH][Trivial] Media, DVB, Siano, smsusb: Avoid static analysis report about 'use after free'.

2011-04-21 Thread Jesper Juhl
, but it makes the tool shut up. The patch below also removes a rather pointless blank line. Signed-off-by: Jesper Juhl j...@chaosbits.net --- smsusb.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index 0b8da57

[PATCH][media] cx23885: Don't leak firmware in cx23885_card_setup()

2011-04-07 Thread Jesper Juhl
We leak the memory allocated to 'fw' (the firmware) when the variable goes out of scope. Fix the leak by calling release_firmware(fw) before 'fw' goes out of scope. Signed-off-by: Jesper Juhl j...@chaosbits.net --- cx23885-cards.c |1 + 1 file changed, 1 insertion(+) compile tested only

[PATCH][media] DVB, DiB9000: Fix leak in dib9000_attach()

2011-04-07 Thread Jesper Juhl
If the second memory allocation in dib9000_attach() fails, we'll leak the memory allocated by the first. Signed-off-by: Jesper Juhl j...@chaosbits.net --- dib9000.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) compile tested only... diff --git a/drivers/media/dvb/frontends

[PATCH][media] DVB, USB, lmedm04: Fix firmware mem leak in lme_firmware_switch()

2011-04-07 Thread Jesper Juhl
Don't leak 'fw' in drivers/media/dvb/dvb-usb/lmedm04.c::lme_firmware_switch() by failing to call release_firmware(). Signed-off-by: Jesper Juhl j...@chaosbits.net --- lmedm04.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) compile tested only diff --git a/drivers/media/dvb/dvb

Re: [PATCH][media] DVB, USB, lmedm04: Fix firmware mem leak in lme_firmware_switch()

2011-04-07 Thread Jesper Juhl
On Thu, 7 Apr 2011, Malcolm Priestley wrote: On Thu, 2011-04-07 at 21:46 +0200, Jesper Juhl wrote: Don't leak 'fw' in drivers/media/dvb/dvb-usb/lmedm04.c::lme_firmware_switch() by failing to call release_firmware(). Signed-off-by: Jesper Juhl j...@chaosbits.net --- lmedm04.c

Re: [Patch] Zarlink zl10036 DVB-S: Fix mem leak in zl10036_attach

2011-02-17 Thread Jesper Juhl
On Thu, 17 Feb 2011, Matthias Schwarzott wrote: On Sunday 06 February 2011, Jesper Juhl wrote: If the memory allocation to 'state' succeeds but we jump to the 'error' label before 'state' is assigned to fe-tuner_priv, then the call to 'zl10036_release(fe)' at the 'error:' label

[Patch] Zarlink zl10036 DVB-S: Fix mem leak in zl10036_attach

2011-02-06 Thread Jesper Juhl
' might not even be needed in this case, but I wasn't sure, so I left it in. Signed-off-by: Jesper Juhl j...@chaosbits.net --- zl10036.c |1 + 1 file changed, 1 insertion(+) compile tested only. diff --git a/drivers/media/dvb/frontends/zl10036.c b/drivers/media/dvb/frontends/zl10036.c

[PATCH] TTUSB DVB: ttusb_boot_dsp() needs to release_firmware() or it leaks memory.

2011-02-06 Thread Jesper Juhl
In drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c:ttusb_boot_dsp() we need to call release_firmware(fw) before returning or we'll leak - no matter if we succeed or fail. Signed-off-by: Jesper Juhl j...@chaosbits.net --- dvb-ttusb-budget.c |1 + 1 file changed, 1 insertion(+) compile

[PATCH][rfc] media, video, stv06xx, pb0100: Don't potentially deref NULL in pb0100_start().

2011-01-13 Thread Jesper Juhl
intimate with this code so I'd like a bit of review/comments on this before it's applied. Anyway, here's a proposed patch. Signed-off-by: Jesper Juhl j...@chaosbits.net --- stv06xx_pb0100.c |2 ++ 1 file changed, 2 insertions(+) compile tested only. diff --git a/drivers/media/video/gspca

Re: [PATVH] media, dvb, IX2505V: Remember to free allocated memory in failure path (ix2505v_attach()).

2011-01-02 Thread Jesper Juhl
On Sun, 2 Jan 2011, Jesper Juhl wrote: On Fri, 31 Dec 2010, Malcolm Priestley wrote: On Fri, 2010-12-31 at 15:51 +0100, Jesper Juhl wrote: On Fri, 31 Dec 2010, Malcolm Priestley wrote: On Fri, 2010-12-31 at 00:11 +0100, Jesper Juhl wrote: Hi, We may leak

[PATCH] media, tlg2300: Fix memory leak in alloc_bulk_urbs_generic()

2011-01-02 Thread Jesper Juhl
correct to me to let variables exist only in the innermost scope they are used. Signed-off-by: Jesper Juhl j...@chaosbits.net --- pd-video.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) compile tested only. diff --git a/drivers/media/video/tlg2300/pd-video.c b

[PATVH] media, dvb, IX2505V: Remember to free allocated memory in failure path (ix2505v_attach()).

2010-12-30 Thread Jesper Juhl
Hi, We may leak the storage allocated to 'state' in drivers/media/dvb/frontends/ix2505v.c::ix2505v_attach() on error. This patch makes sure we free the allocated memory in the failure case. Signed-off-by: Jesper Juhl j...@chaosbits.net --- ix2505v.c |1 + 1 file changed, 1 insertion

[PATCH] saa7164: Remove pointless conditional and save a few bytes in saa7164_downloadfirmware().

2010-12-18 Thread Jesper Juhl
2144 1019927d7 drivers/media/video/saa7164/saa7164-fw.o after: textdata bss dec hex filename 7931 1122136 1017927c3 drivers/media/video/saa7164/saa7164-fw.o Signed-off-by: Jesper Juhl j...@chaosbits.net --- saa7164-fw.c |4 +--- 1 file changed, 1

[PATCH 04/17][trivial] drivers/media/, cx231xx-417: Remove unnecessary casts of void ptr returning alloc function return values

2010-11-08 Thread Jesper Juhl
Hi, The [vk][cmz]alloc(_node) family of functions return void pointers which it's completely unnecessary/pointless to cast to other pointer types since that happens implicitly. This patch removes such casts from drivers/media/ Signed-off-by: Jesper Juhl j...@chaosbits.net --- cx231xx-417.c