In case no valid pixelcode is found, an i of -1 after the loop is out of
bounds for the array.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/platform/exynos4-is/fimc-lite-reg.c
b/drivers/media/platform/exynos4-is/fimc-lite-reg.c
index 72a343e3b..d0dc7ee 100644
--- a/drivers/media
In tda10023_read_signal_strength() we have:
u16 gain = ((255-tda10023_readreg(state, 0x17))) + (255-ifgain)/16;
---^
The closing parenthesis appears misplaced, should this be:
u16 gain = ((255-tda10023_readreg(state, 0x17)) + (25
ed" should only be displayed when request_irq()
failed, not in the case of other errors.
Also I changed some indexes, so a few could be removed.
Signed-off-by: Roel Kluin
---
> I think there were many more issues:
> I must admit I did not compile test this, except with checkpatch.p
d" should only be displayed when
request_irq() failed, not in the case of other errors.
Also I changed some indexes, so a few could be removed.
Signed-off-by: Roel Kluin
---
There were some errors in the changelog and a signoff was missing.
> Ok. You are right! The ch_params[] is
> Ok. You are right! The ch_params[] is a table for keeping the information
> about different standards supported. For a given stdid in std_info, the
> function matches the stdid with that in the table and get the corresponding
> entry.
+ if (k == VPIF_DISPLAY_MAX_DEVICES)
+
>>- if (!std_info)
>>+ if (!std_info->stdid)
>> return -1;
>>
> This is a NACK. We shouldn't check for stdid since the function is supposed
> to update std_info. So just remove
>
> if (!std_info)
> return -1;
I don't see how std_info could get updated. consider the l
The parenthesis was misplaced, tmp is set to 0 or break occurs,
while debugging opera1_usb_i2c_msgxfer() retval was not shown.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/dvb/dvb-usb/opera1.c
b/drivers/media/dvb/dvb-usb/opera1.c
index d4e2309..8305576 100644
--- a/drivers/media/dvb
So after the
probe_out: label, k also reaches VPIF_DISPLAY_MAX_DEVICES after the loop. In
the first iteration in the loop after vpif_int_err: a free_irq() can occur
of an element &vpif_obj.dev[VPIF_DISPLAY_MAX_DEVICES]->channel_id which is
outside vpif_obj.dev[] array boundaries.
Signe
usbvision->vdev was already tested, we should test usbvision->vbi here.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/usbvision/usbvision-video.c
b/drivers/media/video/usbvision/usbvision-video.c
index 1054546..7c17ec6 100644
--- a/drivers/media/video/usbvision/usb
The -EINVAL was overwritten by the si470x_disconnect_check().
Signed-off-by: Roel Kluin
---
Is this needed?
diff --git a/drivers/media/radio/si470x/radio-si470x-common.c
b/drivers/media/radio/si470x/radio-si470x-common.c
index 4da0f15..65b4a92 100644
--- a/drivers/media/radio/si470x/radio
On Tue, Feb 2, 2010 at 3:29 PM, Oliver Neukum wrote:
> Am Dienstag, 2. Februar 2010 15:29:46 schrieb Roel Kluin:
>> If in a cold state and the download succeeded ret is zero, but we
>> should return -ENOMEM.
>>
>> Signed-off-by: Roel Kluin
>> ---
>> Or s
If in a cold state and the download succeeded ret is zero, but we
should return -ENOMEM.
Signed-off-by: Roel Kluin
---
Or shouldn't we?
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c
b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
index e331db8..5d91f70 100644
--- a/drivers/media/dvb/dv
Regardless of the state->Mode in both cases the same value was
written.
If state->Mode wasn't set, it is always 0.
Signed-off-by: Roel Kluin
---
drivers/media/common/tuners/mxl5005s.c |7 +++
1 files changed, 3 insertions(+), 4 deletions(-)
Or were the ones and zero
The wrong command was printed for case CX2341X_ENC_SET_DNR_FILTER_MODE,
and a typo in case CX2341X_ENC_SET_PCR_ID.
Signed-off-by: Roel Kluin
---
Or is this intended?
diff --git a/drivers/media/video/cx23885/cx23885-417.c
b/drivers/media/video/cx23885/cx23885-417.c
index 88c0d24..2ab97ad 100644
vi drivers/media/video/ivtv/ivtv-yuv.c +971
and note that `args->dst.left' is assigned both to
nf->tru_x and nf->dst_x, is that ok?
Roel
--
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://v
The return of saa7164_i2caddr_to_reglen() was not tested.
Signed-off-by: Roel Kluin
---
drivers/media/video/saa7164/saa7164-api.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/saa7164/saa7164-api.c
b/drivers/media/video/saa7164/saa7164-api.c
video_nr is unsigned so the test did not work.
Signed-off-by: Roel Kluin
---
Found using coccinelle: http://coccinelle.lip6.fr/
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 7705fc6..328af3a 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
val and sd->gain are unsigned so the tests did not work.
Signed-off-by: Roel Kluin
---
Found using coccinelle: http://coccinelle.lip6.fr/
diff --git a/drivers/media/video/gspca/ov534.c
b/drivers/media/video/gspca/ov534.c
index 4dbb882..f5d1f18 100644
--- a/drivers/media/video/gspca/ov53
Although these sizes may be the same it is better to calculate the size of
the source, than the destiny.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/v4l2-compat-ioctl32.c
b/drivers/media/video/v4l2-compat-ioctl32.c
index 997975d..23ad218 100644
--- a/drivers/media/video/v4l2
The reg_pair2[j].reg was tested twice.
Signed-off-by: Roel Kluin
---
drivers/media/common/tuners/mxl5007t.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
I think this was intended?
diff --git a/drivers/media/common/tuners/mxl5007t.c
b/drivers/media/common/tuners/mxl5007t.c
Make id signed so we can't get an invalid pointer
when we pass a negative id.
Signed-off-by: Roel Kluin
---
drivers/media/dvb/siano/sms-cards.c |2 +-
drivers/media/dvb/siano/sms-cards.h |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb/sian
The index is signed, make sure it is not negative
when we read the array element.
Signed-off-by: Roel Kluin
---
drivers/media/dvb/siano/sms-cards.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/dvb/siano/sms-cards.c
b/drivers/media/dvb/siano/sms
If vpfe_dev->std_index equals ARRAY_SIZE(vpfe_standards), that is
one too large
Signed-off-by: Roel Kluin
---
drivers/media/video/davinci/vpfe_capture.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/davinci/vpfe_capture.c
b/drivers/media/vi
Op 23-10-09 12:59, Roel Kluin schreef:
> The variables are unsigned so the test `>= 0' is always true,
> the `< 0' test always fails. In these cases the other part of
> the test catches wrapped values.
>
> Signed-off-by: Roel Kluin
> ---
I forgot the stats:
d
The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/common/tuners/tda9887.c
b/drivers/media/common/tuners/tda9887
Prevent read from t_params->ranges[-1].
Signed-off-by: Roel Kluin
---
This is only required when t_params->count can be 0, can it?
Roel
diff --git a/drivers/media/common/tuners/tuner-simple.c
b/drivers/media/common/tuners/tuner-simple.c
index 8abbcc5..e679d5f 100644
--- a/drivers/media/
Produce an error if kmalloc() fails.
Signed-off-by: Roel Kluin
---
Found with sed: http://kernelnewbies.org/roelkluin
Build tested. Please review
diff --git a/drivers/media/video/uvc/uvc_ctrl.c
b/drivers/media/video/uvc/uvc_ctrl.c
index c3225a5..dda80b5 100644
--- a/drivers/media/video/uvc
Prevent NULL dereference if kmalloc() fails.
Signed-off-by: Roel Kluin
---
Found with sed: http://kernelnewbies.org/roelkluin
diff --git a/drivers/media/video/gspca/jeilinj.c
b/drivers/media/video/gspca/jeilinj.c
index dbfa3ed..a11c97e 100644
--- a/drivers/media/video/gspca/jeilinj.c
+++ b
Prevent NULL dereference if kmalloc() fails.
Signed-off-by: Roel Kluin
---
Found with sed: http://kernelnewbies.org/roelkluin
Build tested.
diff --git a/drivers/media/dvb/frontends/lgdt3304.c
b/drivers/media/dvb/frontends/lgdt3304.c
index eb72a98..e334b5d 100644
--- a/drivers/media/dvb
Prevent NULL dereference if kzalloc() fails.
Signed-off-by: Roel Kluin
---
Found with sed: http://kernelnewbies.org/roelkluin
Build tested.
diff --git a/drivers/media/dvb/frontends/au8522_decoder.c
b/drivers/media/dvb/frontends/au8522_decoder.c
index 9e9a755..74981ee 100644
--- a/drivers
Prevent NULL dereference if kmalloc() fails.
Signed-off-by: Roel Kluin
---
Found with sed: http://kernelnewbies.org/roelkluin
Build tested.
diff --git a/drivers/media/dvb/dvb-usb/m920x.c
b/drivers/media/dvb/dvb-usb/m920x.c
index aec7a19..ef9b7be 100644
--- a/drivers/media/dvb/dvb-usb/m920x.c
state->internal allocation may fail as well as the allocation of
stv0900_first_inode or new_node->next_inode in append_internal().
Signed-off-by: Roel Kluin
---
Is this the right thing to do if temp_int == NULL?
diff --git a/drivers/media/dvb/frontends/stv0900_core.c
b/drivers/med
For the bandwidth to be less than 8 MHZ and greater than 6 MHZ is logically
impossible.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/dvb/frontends/cx22700.c
b/drivers/media/dvb/frontends/cx22700.c
index fbd838e..5fbc0fc 100644
--- a/drivers/media/dvb/frontends/cx22700.c
+++ b
The order of indexes is reversed
Signed-off-by: Roel Kluin
---
Right?
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c
index fc976f4..2622a6e 100644
--- a/drivers/media/video/zr364xx.c
+++ b/drivers/media/video/zr364xx.c
@@ -695,7 +695,7 @@ static int zr364xx_release
The guard mistakenly tests against sizeof(freqs) instead of ARRAY_SIZE(freqs).
Signed-off-by: Roel Kluin
---
Andy Walls wrote:
> The cx18 driver suffers from the exact same defect in cx18-controls.c.
Thanks, if not already applied, here is it.
diff --git a/drivers/media/video/ivtv/i
It tested the value of stk_sizes[i].m before checking whether i was in range.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index 4d6785e..b154bd9 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
This mistakenly tests against sizeof(freqs) instead of the array size. Due to
the mask the only illegal value possible was 3.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/ivtv/ivtv-controls.c
b/drivers/media/video/ivtv/ivtv-controls.c
index a3b77ed..4a9c8ce 100644
--- a
parport[n] is checked before n < MAX_CAMS
Signed-off-by: Roel Kluin
---
probably harmless
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c
index 10dbd4a..9e39bc5 100644
--- a/drivers/media/video/bw-qcam.c
+++ b/drivers/media/video/bw-qcam.c
@@ -992,7 +992,7 @@ sta
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
---
This can be reached only when coredev->device_flags contains SMS_DEVICE_FAMILY2,
code
strlcpy() will always null terminate the string.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
index 326f760..cead089 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
input, inp and i are unsigned. When negative they are wrapped and caught by the
other test.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c
b/drivers/media/dvb/ttpci/av7110_v4l.c
index ce64c62..8986d96 100644
--- a/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b
I noted that in get_ep() in drivers/media/video/gspca/gspca.c
usb_set_interface() is not called for an ISOC endpoint with an
altsetting of 0. Is that ok?
Roel
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majord
with `while (try_count-- > 0)' try_count reaches -1 after the loop.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c
index 4262e60..3750f7f 100644
--- a/drivers/media/video/tvp514x.c
+++ b/drivers/media/video/tvp514x.c
@@ -692,
Fix &&/|| typo. `default_norm' can be 0 (PAL), 1 (NTSC) or 2 (SECAM),
the condition tested was impossible.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/zoran/zoran_card.c
b/drivers/media/video/zoran/zoran_card.c
index ea6c577..ea9de8b 100644
--- a/drivers/medi
Fix &&/|| typo
diff --git a/drivers/media/video/zoran/zoran_card.c
b/drivers/media/video/zoran/zoran_card.c
index ea6c577..ea9de8b 100644
--- a/drivers/media/video/zoran/zoran_card.c
+++ b/drivers/media/video/zoran/zoran_card.c
@@ -1022,7 +1022,7 @@ zr36057_init (struct zoran *zr)
zr->vbu
Remove redundant tests on unsigned.
Signed-off-by: Roel Kluin
---
All tests are similar to `if (x < 0 || x > MAX) ...' where x is unsigned.
When x is negative, wrapping occurs. Only the second half is effective.
drivers/media/dvb/ttpci/av7110_v4l.c|2 +-
drivers/medi
fmt->index is unsigned. test doesn't work
Signed-off-by: Roel Kluin
---
Is there another test required?
diff --git a/drivers/media/video/zoran/zoran_driver.c
b/drivers/media/video/zoran/zoran_driver.c
index 092333b..0db5d0f 100644
--- a/drivers/media/video/zoran/zoran_driver.c
+++ b
binary/logical and typo
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/cx23885/cimax2.c
b/drivers/media/video/cx23885/cimax2.c
index 9a65369..08582e5 100644
--- a/drivers/media/video/cx23885/cimax2.c
+++ b/drivers/media/video/cx23885/cimax2.c
@@ -312,7 +312,7 @@ static void
vi drivers/media/dvb/dvb-core/dvb_demux.c +214
and note:
static int dvb_dmx_swfilter_section_copy_dump(struct dvb_demux_feed *feed,
const u8 *buf, u8 len)
{
...
if (sec->tsfeedp + len > DMX_MAX_SECFEED_SIZE) {
...
With while (i++ < 10) { ... } i can reach 11, so callibration still
succeeds at i == 10.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/common/tuners/mt2060.c
b/drivers/media/common/tuners/mt2060.c
index 12206d7..c7abe3d 100644
--- a/drivers/media/common/tuners/mt2060.c
+++ b/driv
Roel Kluin wrote:
> with while (try_count-- > 0) { ... } try_count reaches 0, not -1.
Sorry but this is bogus, please ignore.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordo
with while (try_count-- > 0) { ... } try_count reaches 0, not -1.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c
index 8e23aa5..5f4cbc2 100644
--- a/drivers/media/video/tvp514x.c
+++ b/drivers/media/video/tvp514x.c
@@ -686,7 +68
Since we want to determine whether every retry we had an address_err,
and we decrement retries, we should decrement address_err as well.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/common/saa7146_i2c.c
b/drivers/media/common/saa7146_i2c.c
index c11da4d..2fac001 100644
--- a/drivers
2009/2/2 Mauro Carvalho Chehab :
> Hi Roel,
>
> It seems that you've sent this driver to the wrong ML. Video adapters are not
> handled on those ML's.
Any idea where it should be sent?
Thanks,
Roel
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a messag
vi drivers/media/common/saa7146_i2c.c +292
in saa7146_i2c_transfer(..., int retries)
{
int address_err = 0;
do {
...
if (...)
address_err++;
...
} while (retries--);
/* if every retry had an a
With a postfix decrement t reaches -1 on timeout which results in a
return of 0.
Signed-off-by: Roel Kluin
---
diff --git a/include/video/newport.h b/include/video/newport.h
index 1f5ebea..001b935 100644
--- a/include/video/newport.h
+++ b/include/video/newport.h
@@ -453,7 +453,7 @@ static
When these macros aren't called with 'grp_id' this will result in a
build failure.
Signed-off-by: Roel Kluin
---
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
index 9bf4ccc..ad86caa 100644
--- a/include/media/v4l2-device.h
+++ b/include/media/v4l2-dev
internal->sub_range is unsigned, a negative won't get noticed.
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/dvb/frontends/stb0899_algo.c
b/drivers/media/dvb/frontends/stb0899_algo.c
index 83dc7e1..2ea32da 100644
--- a/drivers/media/dvb/frontends/stb0899_algo.c
+++ b/drive
Is this correct?
--->8--8<
make card signed
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/em28xx/em28xx-cards.c
b/drivers/media/video/em28xx/em28xx-cards.c
index ef9bf00..7c7a96c 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
see vi drivers/media/video/bt8xx/bttvp.h +381
since norm is unsigned in set_tvnorm, a negative won't get noticed.
so remove the redundant check and move it to the caller.
My question is: should we error return like this?
Signed-off-by: Roel Kluin
---
diff --git a/drivers/media/video/bt8xx/bt
60 matches
Mail list logo