Re: [PATCH] media: tm6000: add error handling for dvb_register_adapter

2018-06-11 Thread Alexandre-Xavier Labonté-Lamoureux
ter calling dvb_register_adapter. > > Signed-off-by: Zhouyang Jia > --- > drivers/media/usb/tm6000/tm6000-dvb.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c > b/drivers/media/usb/tm6000/tm6000-dvb.c > index c811fc6..f

[PATCH] media: tm6000: add error handling for dvb_register_adapter

2018-06-10 Thread Zhouyang Jia
When dvb_register_adapter fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling dvb_register_adapter. Signed-off-by: Zhouyang Jia --- drivers/media/usb/tm6000/tm6000-dvb.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-21 Thread Gustavo A. R. Silva
On 05/17/2018 01:08 PM, Gustavo A. R. Silva wrote: BTW, Mauro, you sent a patch to fix an spectre v1 issue in this file yesterday: dvb_ca_en50221.c:1480, but it seems there is another instance of the same issue some lines above: diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c

[PATCH 6/7] media: tm6000: don't check number of messages in the driver

2018-05-20 Thread Wolfram Sang
Since commit 1eace8344c02 ("i2c: add param sanity check to i2c_transfer()"), the I2C core does this check now. We can remove it from drivers. Signed-off-by: Wolfram Sang <w...@the-dreams.de> --- Only build tested. drivers/media/usb/tm6000/tm6000-i2c.c | 2 -- 1 file chan

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Gustavo A. R. Silva
On 05/17/2018 07:13 AM, Mauro Carvalho Chehab wrote: Em Thu, 17 May 2018 08:43:24 -0300 Mauro Carvalho Chehab escreveu: On 05/15/2018 02:39 PM, Dan Carpenter wrote: You'd need to rebuild the db (possibly twice but definitely once). How? Here, I just pull

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Mauro Carvalho Chehab
Em Thu, 17 May 2018 08:43:24 -0300 Mauro Carvalho Chehab escreveu: > > > > On 05/15/2018 02:39 PM, Dan Carpenter wrote: > > > > > >> You'd need to rebuild the db (possibly twice but definitely once). > > > > How? Here, I just pull from your git tree and do a

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Mauro Carvalho Chehab
Em Thu, 17 May 2018 08:34:40 -0300 Mauro Carvalho Chehab escreveu: > Em Thu, 17 May 2018 05:36:03 -0500 > "Gustavo A. R. Silva" escreveu: > > > > > > > On 05/16/2018 08:14 PM, Gustavo A. R. Silva wrote: > > > > > > > > > On 05/15/2018

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Mauro Carvalho Chehab
Em Thu, 17 May 2018 05:36:03 -0500 "Gustavo A. R. Silva" escreveu: > > > On 05/16/2018 08:14 PM, Gustavo A. R. Silva wrote: > > > > > > On 05/15/2018 02:39 PM, Dan Carpenter wrote: > >> You'd need to rebuild the db (possibly twice but definitely once). How? Here, I

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-17 Thread Gustavo A. R. Silva
On 05/16/2018 08:14 PM, Gustavo A. R. Silva wrote: On 05/15/2018 02:39 PM, Dan Carpenter wrote: Dan, These are all the Spectre media issues I see smatch is reporting in linux-next-20180515: drivers/media/cec/cec-pin-error-inj.c:170 cec_pin_error_inj_parse_line() warn: potential spectre

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-16 Thread Gustavo A. R. Silva
On 05/15/2018 02:39 PM, Dan Carpenter wrote: Dan, These are all the Spectre media issues I see smatch is reporting in linux-next-20180515: drivers/media/cec/cec-pin-error-inj.c:170 cec_pin_error_inj_parse_line() warn: potential spectre issue 'pin->error_inj_args'

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-16 Thread Mauro Carvalho Chehab
Em Wed, 16 May 2018 16:11:08 +0300 Dan Carpenter escreveu: > On Tue, May 15, 2018 at 04:00:33PM -0300, Mauro Carvalho Chehab wrote: > > Yeah, that's the same I'm getting from media upstream. > > > > > drivers/media/cec/cec-pin-error-inj.c:170

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-16 Thread Dan Carpenter
On Tue, May 15, 2018 at 04:00:33PM -0300, Mauro Carvalho Chehab wrote: > Yeah, that's the same I'm getting from media upstream. > > > drivers/media/cec/cec-pin-error-inj.c:170 cec_pin_error_inj_parse_line() > > warn: potential spectre issue 'pin->error_inj_args' > > This one seems a false

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Dan Carpenter
On Tue, May 15, 2018 at 12:29:10PM -0500, Gustavo A. R. Silva wrote: > > > On 05/15/2018 09:16 AM, Dan Carpenter wrote: > > > > > > > > I'm curious about how you finally resolved to handle these issues. > > > > > > > > I noticed Smatch is no longer reporting them. > > > > > > There was no

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Mauro Carvalho Chehab
Em Tue, 15 May 2018 12:29:10 -0500 "Gustavo A. R. Silva" escreveu: > On 05/15/2018 09:16 AM, Dan Carpenter wrote: > >>> > >>> I'm curious about how you finally resolved to handle these issues. > >>> > >>> I noticed Smatch is no longer reporting them. > >> > >> There was

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Gustavo A. R. Silva
On 05/15/2018 09:16 AM, Dan Carpenter wrote: I'm curious about how you finally resolved to handle these issues. I noticed Smatch is no longer reporting them. There was no direct fix for it, but maybe this patch has something to do with the smatch error report cleanup: commit

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Dan Carpenter
On Tue, May 15, 2018 at 08:59:53AM -0300, Mauro Carvalho Chehab wrote: > Em Mon, 14 May 2018 22:31:37 -0500 > "Gustavo A. R. Silva" escreveu: > > > Hi Mauro, > > > > On 04/26/2018 06:42 PM, Mauro Carvalho Chehab wrote: > > > > >> > > >> I noticed you changed the status

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-15 Thread Mauro Carvalho Chehab
Em Mon, 14 May 2018 22:31:37 -0500 "Gustavo A. R. Silva" escreveu: > Hi Mauro, > > On 04/26/2018 06:42 PM, Mauro Carvalho Chehab wrote: > > >> > >> I noticed you changed the status of this series from rejected to new. > > > > Yes. > > > >> Also, there are other

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-05-14 Thread Gustavo A. R. Silva
Hi Mauro, On 04/26/2018 06:42 PM, Mauro Carvalho Chehab wrote: I noticed you changed the status of this series from rejected to new. Yes. Also, there are other similar issues in media/pci/ Well, the issues will be there everywhere on all media drivers. I marked your patches because I

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-26 Thread Mauro Carvalho Chehab
Em Thu, 26 Apr 2018 16:41:56 -0500 "Gustavo A. R. Silva" escreveu: > Hi Mauro, > > On 04/23/2018 02:17 PM, Mauro Carvalho Chehab wrote: > > Em Mon, 23 Apr 2018 14:11:02 -0500 > > > > Thanks, I 'll mark this series as rejected at patchwork.linuxtv.org. > > Please feel

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-26 Thread Gustavo A. R. Silva
Hi Mauro, On 04/23/2018 02:17 PM, Mauro Carvalho Chehab wrote: Em Mon, 23 Apr 2018 14:11:02 -0500 Thanks, I 'll mark this series as rejected at patchwork.linuxtv.org. Please feel free to resubmit any patch if they represent a real threat, adding a corresponding description about the threat

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Peter Zijlstra
On Tue, Apr 24, 2018 at 02:47:55PM -0300, Mauro Carvalho Chehab wrote: > So, I'm wondering if are there any way to mitigate it inside the > core itself, instead of doing it on every driver, e. g. changing > v4l_enum_fmt() implementation at v4l2-ioctl. > > Ok, a "poor man" approach would be to

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Mauro Carvalho Chehab
Em Tue, 24 Apr 2018 12:36:09 +0200 Peter Zijlstra escreveu: > On Tue, Apr 24, 2018 at 12:35:00PM +0300, Dan Carpenter wrote: > > On Mon, Apr 23, 2018 at 03:24:55PM -0300, Mauro Carvalho Chehab wrote: > > > Em Mon, 23 Apr 2018 12:38:03 -0500 > > > "Gustavo A. R. Silva"

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Peter Zijlstra
On Tue, Apr 24, 2018 at 12:36:09PM +0200, Peter Zijlstra wrote: > > Then usespace probes which part of the descr[] array is now in cache and > from that it can infer the initial out-of-bound value. Just had a better look at v4l_fill_fmtdesc() and actually read the comment. The code cannot be

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Peter Zijlstra
On Tue, Apr 24, 2018 at 12:35:00PM +0300, Dan Carpenter wrote: > On Mon, Apr 23, 2018 at 03:24:55PM -0300, Mauro Carvalho Chehab wrote: > > Em Mon, 23 Apr 2018 12:38:03 -0500 > > "Gustavo A. R. Silva" escreveu: > > > @@ -875,6 +876,7 @@ static int

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Mauro Carvalho Chehab
: > > > > > f->index can be controlled by user-space, hence leading to a > > > potential exploitation of the Spectre variant 1 vulnerability. > > > > > > Smatch warning: > > > drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() &g

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-24 Thread Dan Carpenter
al exploitation of the Spectre variant 1 vulnerability. > > > > Smatch warning: > > drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() warn: > > potential spectre issue 'format' > > > > Fix this by sanitizing f->index before using it to index &

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Gustavo A. R. Silva
t...@embeddedor.com> escreveu: f->index can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. Smatch warning: drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() warn: potential spectre issue 'format' Fix this

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Mauro Carvalho Chehab
> > > >> f->index can be controlled by user-space, hence leading to a > >> potential exploitation of the Spectre variant 1 vulnerability. > >> > >> Smatch warning: > >> drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap(

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Gustavo A. R. Silva
ty. Smatch warning: drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() warn: potential spectre issue 'format' Fix this by sanitizing f->index before using it to index array _format_ Notice that given that speculation windows are large, the policy is to kill the specula

Re: [PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Mauro Carvalho Chehab
Em Mon, 23 Apr 2018 12:38:03 -0500 "Gustavo A. R. Silva" <gust...@embeddedor.com> escreveu: > f->index can be controlled by user-space, hence leading to a > potential exploitation of the Spectre variant 1 vulnerability. > > Smatch warning: > drivers/m

[PATCH 01/11] media: tm6000: fix potential Spectre variant 1

2018-04-23 Thread Gustavo A. R. Silva
f->index can be controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. Smatch warning: drivers/media/usb/tm6000/tm6000-video.c:879 vidioc_enum_fmt_vid_cap() warn: potential spectre issue 'format' Fix this by sanitizing f->index before

[PATCH 28/30] media: tm6000: avoid casting just to print pointer address

2018-03-23 Thread Mauro Carvalho Chehab
Instead of casting, just use %p. Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com> --- drivers/media/usb/tm6000/tm6000-video.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-v

usb/media/tm6000: use-after-free in tm6000_read_write_usb

2017-11-06 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit 39dae59d66acd86d1de24294bd2f343fd5e7a625 (4.14-rc8). usb 1-1: USB disconnect, device number 11 tm6000: disconnecting tm6000 #0 xc2028 0-0061: destroying instance

[PATCH 7/7] tm6000: fix spelling mistake: "synchronuously" -> "synchronously"

2017-11-02 Thread Colin King
From: Colin Ian King <colin.k...@canonical.com> Trivial fix to spelling mistake in error message text Signed-off-by: Colin Ian King <colin.k...@canonical.com> --- drivers/media/usb/tm6000/tm6000-dvb.c | 4 ++-- drivers/media/usb/tm6000/tm6000-video.c | 4 ++-- 2 files changed,

[PATCH 9/9] [media] tm6000: Use common error handling code in tm6000_prepare_isoc()

2017-09-15 Thread SF Markus Elfring
From: Markus Elfring <elfr...@users.sourceforge.net> Date: Fri, 15 Sep 2017 08:02:33 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> --- drivers/media/usb/t

[PATCH 8/9] [media] tm6000: Use common error handling code in tm6000_start_stream()

2017-09-15 Thread SF Markus Elfring
From: Markus Elfring <elfr...@users.sourceforge.net> Date: Fri, 15 Sep 2017 07:47:41 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> --- drivers/media/usb/t

[PATCH 7/9] [media] tm6000: Improve a size determination in dvb_init()

2017-09-15 Thread SF Markus Elfring
nux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> --- drivers/media/usb/tm6000/tm6000-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-

[PATCH 6/9] [media] tm6000: Use common error handling code in tm6000_cards_setup()

2017-09-15 Thread SF Markus Elfring
<elfr...@users.sourceforge.net> --- drivers/media/usb/tm6000/tm6000-cards.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm6000-cards.c index 72dd6b80394f..502e0b38b7f1 100644 --- a/drivers/media/usb/tm6000/tm

[PATCH 5/9] [media] tm6000: Delete an unnecessary variable initialisation in tm6000_usb_probe()

2017-09-15 Thread SF Markus Elfring
e.net> --- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm6000-cards.c index 77347541904d..72dd6b80394f 100644 --- a/drivers/media/usb/tm6000/tm6000-cards.c +++ b/dr

[PATCH 4/9] [media] tm6000: One function call less in tm6000_usb_probe() after error detection

2017-09-15 Thread SF Markus Elfring
sary with this refactoring. Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> --- drivers/media/usb/tm6000/tm6000-cards.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/t

[PATCH 3/9] [media] tm6000: Use common error handling code in tm6000_usb_probe()

2017-09-15 Thread SF Markus Elfring
From: Markus Elfring <elfr...@users.sourceforge.net> Date: Thu, 14 Sep 2017 16:00:47 +0200 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> --- drivers/media/usb/t

[PATCH 2/9] [media] tm6000: Adjust seven checks for null pointers

2017-09-15 Thread SF Markus Elfring
Thus fix the affected source code places. Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> --- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- drivers/media/usb/tm6000/tm6000-dvb.c | 6 +++--- drivers/media/usb/tm6000/tm6000-input.c | 2 +- drivers/media/usb/tm6000/tm6000

[PATCH 1/9] [media] tm6000: Delete seven error messages for a failed memory allocation

2017-09-15 Thread SF Markus Elfring
--- drivers/media/usb/tm6000/tm6000-cards.c | 1 - drivers/media/usb/tm6000/tm6000-dvb.c | 5 + drivers/media/usb/tm6000/tm6000-video.c | 13 +++-- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm

[PATCH 0/9] [media] TM6000: Adjustments for some function implementations

2017-09-15 Thread SF Markus Elfring
Use common error handling code in tm6000_start_stream() Use common error handling code in tm6000_prepare_isoc() drivers/media/usb/tm6000/tm6000-cards.c | 36 - drivers/media/usb/tm6000/tm6000-dvb.c | 24 +++--- drivers/media/usb/tm6000/tm6000-i

[PATCH 4/5] [media] tm6000: constify videobuf_queue_ops structures

2017-08-04 Thread Julia Lawall
+const struct videobuf_queue_ops i = { ... }; // Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/media/usb/tm6000/tm6000-video.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/

[PATCH 7/7] rc-core: tm6000 - leave the internals of rc_dev alone

2017-05-01 Thread David Härdeman
Not sure what the driver is trying to do, however, IR handling seems incomplete ATM so deleting the offending parts shouldn't affect functionality Signed-off-by: David Härdeman <da...@hardeman.nu> --- drivers/media/usb/tm6000/tm6000-input.c |4 1 file changed, 4 deletions(-) diff

[PATCH] [media] tm6000: Fix resource freeing in 'tm6000_prepare_isoc()'

2017-02-22 Thread Christophe JAILLET
; @@ * if (x == NULL) { ... when != x = e; ( *f(<+...x...+>); | *ret = f(<+...x...+>); ) ... } Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> --- drivers/media/usb/tm6000/tm6000-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH -next] [media] media: usb: tm6000: fix typo in parameter description

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix typo in parameter description. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/media/usb/tm6000/tm6000-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-input.

[media] tm6000: Addition of an asterisk to the data type for “urb_dma”?

2016-12-24 Thread SF Markus Elfring
Hello, I have looked at the implementation of the function “tm6000_alloc_urb_buffers” once more. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/media/usb/tm6000/tm6000-video.c?id=84ede50b623fb45c4c026c80d0abf8cc5193f041#n469 A pointer for an array is also assigned

[PATCH] tm6000: Clean up file handle in open() error path.

2016-12-19 Thread Santosh Kumar Singh
Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh <kumar.san1...@gmail.com> --- drivers/media/usb/tm6000/tm6000-video.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-vide

[PATCH] tm6000: Clean up file handle in open() error path.

2016-12-19 Thread Santosh Kumar Singh
Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh <kumar.san1...@gmail.com> --- drivers/media/usb/tm6000/tm6000-video.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-vide

[PATCH v2 44/58] tm6000: don't break long lines

2016-10-18 Thread Mauro Carvalho Chehab
;$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; } Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com> --- drivers/media/usb/

[PATCH 45/57] [media] tm6000: don't break long lines

2016-10-14 Thread Mauro Carvalho Chehab
com> --- drivers/media/usb/tm6000/tm6000-alsa.c | 4 +--- drivers/media/usb/tm6000/tm6000-core.c | 11 +++ drivers/media/usb/tm6000/tm6000-dvb.c | 16 +--- drivers/media/usb/tm6000/tm6000-i2c.c | 3 +-- drivers/media/usb/tm6000/tm6000-stds.c | 3 +-- drivers/media/usb/

[PATCH 26/28] media: usb: tm6000: tm6000-video: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-...@sang-engineering.com> --- drivers/media/usb/tm6000/tm6000-video.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-v

[PATCH 25/28] media: usb: tm6000: tm6000-dvb: don't print error when allocating urb fails

2016-08-11 Thread Wolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-...@sang-engineering.com> --- drivers/media/usb/tm6000/tm6000-dvb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c b/drivers/media/usb/

[PATCH] [media] cx25821, cx88, tm6000: use SNDRV_DEFAULT_ENABLE_PNP

2015-09-21 Thread Luis de Bethencourt
ow fix into a patch per driver if that's better. Thanks, Luis drivers/media/pci/cx25821/cx25821-alsa.c | 2 +- drivers/media/pci/cx88/cx88-alsa.c | 2 +- drivers/media/usb/tm6000/tm6000-alsa.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/pci/cx25821/cx25821-

[PATCH 07/11] [media] tm6000: remove needless check

2015-06-05 Thread Mauro Carvalho Chehab
Smatch reports a warning: drivers/media/usb/tm6000/tm6000-video.c:646 tm6000_prepare_isoc() error: we previously assumed 'dev-urb_buffer' could be null (see line 624) This is not really a problem, but it actually shows that the check if urb_buffer is NULL is being done twice

[PATCH 16/19] tm6000: embed video_device

2015-03-09 Thread Hans Verkuil
From: Hans Verkuil hans.verk...@cisco.com Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/usb/tm6000/tm6000-video.c | 59

Re: [PATCH v1 41/49] media: usb: tm6000: prepare for enabling irq in complete()

2013-08-22 Thread Hans Verkuil
...@cisco.com Regards, Hans --- drivers/media/usb/tm6000/tm6000-video.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index cc1aa14..8bb440f 100644 --- a/drivers/media/usb

[PATCH v1 41/49] media: usb: tm6000: prepare for enabling irq in complete()

2013-08-17 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Mauro Carvalho Chehab mche...@redhat.com Cc: linux-media@vger.kernel.org Signed-off-by: Ming Lei ming@canonical.com --- drivers/media/usb/tm6000/tm6000-video.c |5 +++-- 1 file changed, 3 insertions

[PATCH 39/50] media: usb: tm6000: spin_lock in complete() cleanup

2013-07-11 Thread Ming Lei
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: Mauro Carvalho Chehab mche...@redhat.com Cc: linux-media@vger.kernel.org Signed-off-by: Ming Lei ming@canonical.com --- drivers/media/usb/tm6000/tm6000-video.c |5 +++-- 1 file changed, 3 insertions

[RFC PATCH 07/13] tm6000: remove deprecated current_norm

2013-06-03 Thread Hans Verkuil
/tm6000/tm6000-cards.c |2 +- drivers/media/usb/tm6000/tm6000-video.c | 13 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm6000-cards.c index 307d8c5..1ccaadd 100644 --- a/drivers/media/usb/tm6000

re: [media] tm6000: add support for control events and prio handling

2013-02-07 Thread Dan Carpenter
Hello Hans Verkuil, The patch 770056c47fbb: [media] tm6000: add support for control events and prio handling from Sep 11, 2012, leads to the following Smatch warning: drivers/media/usb/tm6000/tm6000-video.c:1462 __tm6000_poll() error: potentially dereferencing uninitialized 'buf

Re: [media] tm6000: add support for control events and prio handling

2013-02-07 Thread Hans Verkuil
On Thu 7 February 2013 11:44:54 Dan Carpenter wrote: Hello Hans Verkuil, The patch 770056c47fbb: [media] tm6000: add support for control events and prio handling from Sep 11, 2012, leads to the following Smatch warning: drivers/media/usb/tm6000/tm6000-video.c:1462 __tm6000_poll

[PATCH] tm6000: fix an uninitialized variable.

2013-02-07 Thread Hans Verkuil
tm6000_poll could use an uninitialized buf pointer. Move the buf-handling code inside the 'if' that initializes the buf pointer. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Reported-by: Dan Carpenter dan.carpen...@oracle.com --- drivers/media/usb/tm6000/tm6000-video.c |8 1

[GIT PULL FOR v3.9] v4l2-compliance fixes for tm6000

2013-02-05 Thread Hans Verkuil
These patches fix various v4l2-compliance issues for the tm6000. Tested with my tm6000. Unchanged from the RFC patches posted a few days ago. Regards, Hans The following changes since commit a32f7d1ad3744914273c6907204c2ab3b5d496a0: Merge branch 'v4l_for_linus' into staging

[RFC PATCH 0/6] tm6000: v4l2-compliance fixes

2013-02-01 Thread Hans Verkuil
of globally. Something to work on in a future patch as that's quite a bit more work. fail: v4l2-test-buffers.cpp(109): can_stream !mmap_valid !userptr_valid !dmabuf_valid This is due to the fact that tm6000 doesn't support vb2. Again, more work than I have

[RFC PATCH 5/6] tm6000: add poll op for radio device node.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/usb/tm6000/tm6000-video.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index ac25885

[RFC PATCH 4/6] tm6000: set colorspace field.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/usb/tm6000/tm6000-video.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index 25202a7

[RFC PATCH 6/6] tm6000: fix G/TRY_FMT.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil hans.verk...@cisco.com Two fixes: - the priv field wasn't set to 0. - only V4L2_FIELD_INTERLACED is supported. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/usb/tm6000/tm6000-video.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions

[RFC PATCH 3/6] tm6000: add support for control events and prio handling.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/usb/tm6000/tm6000-video.c | 31 +++ drivers/media/usb/tm6000/tm6000.h |2 ++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git

[RFC PATCH 2/6] tm6000: convert to the control framework.

2013-02-01 Thread Hans Verkuil
From: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/usb/tm6000/tm6000-video.c | 232 +-- drivers/media/usb/tm6000/tm6000.h |3 + 2 files changed, 68 insertions(+), 167 deletions(-) diff --git

[patch] [media] tm6000: check an allocation for failure

2013-01-29 Thread Dan Carpenter
This allocation had no error checking. It didn't need to be under the mutex so I moved it out form there. That makes the error handling easier and is a potential speed up. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/usb/tm6000/tm6000-core.c b/drivers/media

[PATCH] [media] tm6000-video.c: warning fix

2012-12-20 Thread Mauro Carvalho Chehab
drivers/media/usb/tm6000/tm6000-video.c: In function '__check_keep_urb': drivers/media/usb/tm6000/tm6000-video.c:1926:1: warning: return from incompatible pointer type [enabled by default] Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com --- drivers/media/usb/tm6000/tm6000-video.c | 2

[PATCH] tm6000-dvb: Fix module unload.

2012-11-05 Thread Julian Scheel
dvb_unregister_frontend has to be called before detach. Otherwise the unregister call will segfault. This made tm6000-dvb module unload unusable. Signed-off-by: Julian Scheel jul...@jusst.de --- drivers/media/usb/tm6000/tm6000-dvb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH] tm6000: Add parameter to keep urb bufs allocated.

2012-10-08 Thread Julian Scheel
will stay available until the driver is unloaded. Signed-off-by: Julian Scheel jul...@jusst.de --- drivers/media/video/tm6000/tm6000-video.c | 111 +- drivers/media/video/tm6000/tm6000.h | 5 ++ 2 files changed, 97 insertions(+), 19 deletions

Re: [PATCH] tm6000: Add parameter to keep urb bufs allocated.

2012-10-08 Thread Ezequiel Garcia
comitting it? You can re-send a new patch with this subject: [PATCH v2] tm6000: Add parameter to keep urb bufs allocated Like here: https://lkml.org/lkml/2012/9/23/128 Notice you can place comments (like a patch changelog) after the: Signed-off --- The maintainer will pick the latest version

[PATCH] tm6000: Add parameter to keep urb bufs allocated.

2012-10-04 Thread Julian Scheel
the driver is unloaded. Signed-off-by: Julian Scheel jul...@jusst.de --- drivers/media/video/tm6000/tm6000-video.c | 111 +- drivers/media/video/tm6000/tm6000.h | 5 ++ 2 files changed, 97 insertions(+), 19 deletions(-) diff --git a/drivers/media/video/tm6000

Re: [PATCH] tm6000: Add parameter to keep urb bufs allocated.

2012-10-04 Thread Ezequiel Garcia
the first time. Afterwards the initially allocated memory will be reused, so it is ensured that the memory will stay available until the driver is unloaded. Signed-off-by: Julian Scheel jul...@jusst.de --- drivers/media/video/tm6000/tm6000-video.c | 111 +- drivers

[PATCH 12/14] drivers/media/usb/tm6000/tm6000-video.c: fix error return code

2012-09-06 Thread Peter Senna Tschudin
\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/tm6000/tm6000-video.c |1 + 1 file changed, 1 insertion

[TM6000] Request video grabber support for geniatech satbox

2012-08-28 Thread Olcay Korkmaz
Hi All I have geniatech satbox it's tm6000 device with dvbs and Analogue CVBS A/V grabber I know tm6000 module doesn't support dvb-s but can i use satbox for video grabber if I load tm6000 module it's recognized to generic and loaded with XC2028 firmware satbox doesn't have xc2028 tuner it comes

[PATCH 3/5] drivers/media/video/{s2255drv.c,tm6000/tm6000-alsa.c,tm6000/tm6000-input.c}: Remove potential NULL dereferences

2012-08-14 Thread Julia Lawall
; identifier i,fld; statement S; @@ - T i = E-fld; + T i; ... when != E when != i if (E == NULL) S + i = E-fld; // /smpl Signed-off-by: Julia Lawall julia.law...@lip6.fr --- drivers/media/video/s2255drv.c|3 ++- drivers/media/video/tm6000/tm6000-alsa.c |3 ++- drivers

[RFC PATCH 06/26] tm6000: remove V4L2_FL_LOCK_ALL_FOPS

2012-06-24 Thread Hans Verkuil
From: Hans Verkuil hans.verk...@cisco.com Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/video/tm6000/tm6000-video.c | 52 - 1 file changed

Fw: tm6000 driver questions

2012-04-25 Thread matthieu castet
- Message Transféré - Date: Wed, 25 Apr 2012 10:16:57 -0700 De: Vladimir Kerkez vker...@gmail.com À: castet.matth...@free.fr Sujet: tm6000 driver questions Hello, I would like to thank you for your outstanding work on the tm6000 chipset. Because of you (and many other people) I

Re: [PATCH 07/12] drivers: media: video: tm6000: tm6000.h: Include version.h header

2012-04-19 Thread Mauro Carvalho Chehab
Em 18-04-2012 01:30, Marcos Paulo de Souza escreveu: The output of make versioncheck told us that: drivers/media/video/tm6000/tm6000.h: 401: need linux/version.h If we take a look at the code, we can see the use of the macro KERNEL_VERSION. So, we need this include. In this patch too

[PATCH 07/12] drivers: media: video: tm6000: tm6000.h: Include version.h header

2012-04-17 Thread Marcos Paulo de Souza
The output of make versioncheck told us that: drivers/media/video/tm6000/tm6000.h: 401: need linux/version.h If we take a look at the code, we can see the use of the macro KERNEL_VERSION. So, we need this include. In this patch too, the headers of the file were reordered in alphabetic order

Re: Add usb device id for tm6000-cards.c

2012-04-10 Thread Mauro Carvalho Chehab
Em 22-03-2012 16:37, Marek Chmielewski escreveu: -- Pozdrawiam Marek Chmielewski patch_for_tm6000-cards.patch --- tm6000-cards.c.bakup 2012-03-10 14:34:07.471348336 +0100 +++ tm6000-cards.c2012-03-10 15:18:09.856380721 +0100 Please, use it ad diff -p1 format (e. g. a/drivers

Add usb device id for tm6000-cards.c

2012-03-22 Thread Marek Chmielewski
-- Pozdrawiam Marek Chmielewski --- tm6000-cards.c.bakup 2012-03-10 14:34:07.471348336 +0100 +++ tm6000-cards.c 2012-03-10 15:18:09.856380721 +0100 @@ -615,6 +615,7 @@ struct usb_device_id tm6000_id_table[] = { { USB_DEVICE(0x6000, 0x0001), .driver_info = TM5600_BOARD_GENERIC }, { USB_DEVICE

Re: Add usb device id for tm6000-cards.c

2012-03-22 Thread Sylwester Nawrocki
Hello, On 03/22/2012 08:37 PM, Marek Chmielewski wrote: You need to at least add your Signed-off-by in order to have the patch applied to the mainline kernel. Also, it would be good to send the patch inlined, rather than as an attachment. I suggest using git format-patch, git send-email.

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

2012-02-09 Thread Jesper Juhl
...@chaosbits.net --- drivers/media/video/tm6000/tm6000-input.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/tm6000/tm6000-input.c b/drivers/media/video/tm6000/tm6000-input.c index 7844607..859eb90 100644 --- a/drivers/media/video

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

2012-02-05 Thread Thierry Reding
on understanding what the code does or why. I don't even 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

[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] tm6000 : improve loading speed on hauppauge 900H

2011-12-22 Thread Matthieu CASTET
--- drivers/media/video/tm6000/tm6000-cards.c |2 ++ drivers/media/video/tm6000/tm6000-core.c | 16 ++-- drivers/media/video/tm6000/tm6000-i2c.c |8 +--- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/media/video/tm6000/tm6000-cards.c b/drivers

[PATCH] tm6000 : improve loading speed on hauppauge 900H

2011-12-16 Thread Matthieu CASTET
--- drivers/staging/tm6000/tm6000-cards.c |2 ++ drivers/staging/tm6000/tm6000-core.c | 16 +++- drivers/staging/tm6000/tm6000-i2c.c |8 +--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000

[PATCH] tm6000 : dvb doesn't work on usb1.1

2011-12-16 Thread Matthieu CASTET
Signed-off-by: Matthieu CASTET castet.matth...@free.fr --- drivers/staging/tm6000/tm6000-dvb.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-dvb.c b/drivers/staging/tm6000/tm6000-dvb.c index 8f2a50b..cbecb7d 100644 --- a/drivers

re: [media] tm6000: rewrite IR support

2011-12-13 Thread Dan Carpenter
Hello Mauro Carvalho Chehab, This is a semi-automatic email about new static checker warnings. The patch 4a83b0115066: [media] tm6000: rewrite IR support from Nov 29, 2011, leads to the following Smatch complaint: drivers/media/video/tm6000/tm6000-input.c +327 __tm6000_ir_int_start

[patch] [media] tm6000: using an uninitialized variable in debug code

2011-12-13 Thread Dan Carpenter
dprintk() dereferences ir. I'm not sure why gcc doesn't complain about this. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/tm6000/tm6000-input.c b/drivers/media/video/tm6000/tm6000-input.c index 8d92527..7844607 100644 --- a/drivers/media/video/tm6000

[PATCH] [media] tm6000: Fix a warning at tm6000_ir_int_start()

2011-12-11 Thread Mauro Carvalho Chehab
drivers/media/video/tm6000/tm6000-input.c: In function ‘tm6000_ir_int_start’: drivers/media/video/tm6000/tm6000-input.c:381:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com --- drivers/media/video/tm6000

Re: [PATCH 2/2] [media] tm6000: Fix bad indentation.

2011-12-07 Thread Mauro Carvalho Chehab
On 06-12-2011 19:03, Antti Palosaari wrote: On 12/06/2011 10:58 PM, Mauro Carvalho Chehab wrote: On 06-12-2011 12:13, Thierry Reding wrote: * Antti Palosaari wrote: That question is related to that kind of indentation generally, not only that patch. On 12/06/2011 03:39 PM, Thierry Reding

Re: [PATCH 3/5] tm6000: bugfix interrupt reset

2011-12-06 Thread Thierry Reding
* Thierry Reding wrote: * Mauro Carvalho Chehab wrote: That means that all we need is to get rid of TM6000_QUIRK_NO_USB_DELAY. I've just reviewed my patches again and it seems that no-USB-delay quirk patch was only partially applied. The actual location where it was introduced was in

  1   2   3   4   5   6   7   >