Re: [patch 2/2] [media] ds3000: off by one in ds3000_read_snr()

2012-01-19 Thread Dan Carpenter
On Wed, Jan 18, 2012 at 06:06:46PM +0100, walter harms wrote: Am 17.01.2012 08:30, schrieb Dan Carpenter: This is a static checker patch and I don't have the hardware to test this, so please review it carefully. The dvbs2_snr_tab[] array has 80 elements so when we cap it at 80, that's

Re: [patch 2/2] [media] ds3000: off by one in ds3000_read_snr()

2012-01-19 Thread Dan Carpenter
the hardware either so this is pure theoretical. Access to the data field depends on the value of dvbs2_noise_reading/tmp even when the data are reasonable like 50/100 snr_reading would become 0 and the index suddenly is -1. It's a good point. I will redo the patch. regards, dan carpenter

[patch 1/2] [media] ds3000: using logical instead of bitwise

2012-01-16 Thread Dan Carpenter
The intent here was to test if the FE_HAS_LOCK was set. The current test is equivalent to if (status) { ... Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index 9387770..af65d01 100644 --- a/drivers

[patch 2/2] [media] ds3000: off by one in ds3000_read_snr()

2012-01-16 Thread Dan Carpenter
snr_reading - 1 as the array offset. I've done the same thing here. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index af65d01..3f5ae0a 100644 --- a/drivers/media/dvb/frontends/ds3000.c +++ b

[patch] [media] saa7164: remove duplicate initialization

2012-01-15 Thread Dan Carpenter
These were initialized twice by mistake. They were defined the same way both times so this doesn't change how the code works. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/saa7164/saa7164-cards.c b/drivers/media/video/saa7164/saa7164-cards.c index

[patch] [media] tlg2300: fix up check_firmware() return

2012-01-15 Thread Dan Carpenter
and zero on success. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/tlg2300/pd-main.c b/drivers/media/video/tlg2300/pd-main.c index 129f135..c096b3f 100644 --- a/drivers/media/video/tlg2300/pd-main.c +++ b/drivers/media/video/tlg2300/pd-main.c @@ -374,7

re: V4L/DVB (12892): DVB-API: add support for ISDB-T and ISDB-Tsb (version 5.1)

2012-01-13 Thread Dan Carpenter
, 0, 0), + _DTV_CMD(DTV_ISDBT_LAYERC_SEGMENT_COUNT, 0, 0), + _DTV_CMD(DTV_ISDBT_LAYERC_TIME_INTERLEAVING, 0, 0), regards, dan carpenter -- 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

[patch] [media] mb86a20s: fix off by one checks

2012-01-12 Thread Dan Carpenter
Clearly = was intended here instead of . Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/frontends/mb86a20s.c b/drivers/media/dvb/frontends/mb86a20s.c index 38778a8..4e6f836 100644 --- a/drivers/media/dvb/frontends/mb86a20s.c +++ b/drivers/media/dvb

[patch] [media] cx231xx: dereferencing NULL after allocation failure

2012-01-12 Thread Dan Carpenter
dev is NULL here so we should use nr instead of dev-devno. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 919ed77..875a7ce 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c

[patch] [media] cx23885: handle errors from videobuf_dvb_get_frontend()

2012-01-10 Thread Dan Carpenter
The error handling in the original code wasn't complete so static checkers complained about a potential NULL deference. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Compile tested only. I don't think there is anything else that needs to be done before returning, but it would

Re: [patch] [media] af9013: change to

2012-01-09 Thread Dan Carpenter
difference between and is that has orderring guarantees but that's also not a factor here. regards, dan carpenter signature.asc Description: Digital signature

[patch] [media] af9013: change to

2012-01-04 Thread Dan Carpenter
This is just a cleanup, it doesn't change how the code works. These are compound conditions and not bitwise operations so it should be and not . Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/frontends/af9013.c b/drivers/media/dvb/frontends/af9013.c index

[patch] [media] saa7134: use correct array offset

2012-01-04 Thread Dan Carpenter
Smatch complains that i can be one passed the end of the array if we don't hit the break statement. We should be using the audio here like we do in the other places. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Compile tested only. Please review carefully. diff --git a/drivers

[patch -next] V4L/DVB: v4l2-ioctl: integer overflow in video_usercopy()

2012-01-04 Thread Dan Carpenter
211 Cc: stable sta...@vger.kernel.org Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index d2f981a..4942f81 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -1133,6 +1133,7 @@ struct v4l2_querymenu

[patch -longterm v2] V4L/DVB: v4l2-ioctl: integer overflow in video_usercopy()

2012-01-04 Thread Dan Carpenter
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index b59e78c..9e2088c 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -858,6 +858,7 @@ struct v4l2_querymenu { #define V4L2_CTRL_FLAG_NEXT_CTRL

Re: [patch -longterm] V4L/DVB: v4l2-ioctl: integer overflow in video_usercopy()

2012-01-04 Thread Dan Carpenter
On Tue, Jan 03, 2012 at 12:55:39PM -0800, Greg KH wrote: Ok, can someone please send me the accepted version of this patch for inclusion in the 2.6.32-stable tree? Sorry for that. Holidays and all. I'll send a patch tomorrow. regards, dan carpenter signature.asc Description: Digital

Re: [PATCH 12/15] module_param: make bool parameters really bool (drivers misc)

2012-01-03 Thread Dan Carpenter
= 0; bailearly should be an int here. It's part of some ugly debug code where a value of 3 means bailout at point 3. Maybe we should just remove it instead... regards, dan carpenter signature.asc Description: Digital signature

re: [media] cx23885-dvb: Remove a dirty hack that would require DVBv3

2012-01-03 Thread Dan Carpenter
); New dereference. 136 } 137 regards, dan carpenter -- 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 1/2] [media] Staging: dt3155v4l: update to newer API

2011-12-21 Thread Dan Carpenter
/staging/media/dt3155v4l/dt3155v4l.c:311:2: warning: (near initialization for ‘q_ops.start_streaming’) [enabled by default] Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Please double check that this is sufficient. I'm not very familiar with this code. diff --git a/drivers/staging

[patch 2/2] [media] Staging: dt3155v4l: probe() always fails

2011-12-21 Thread Dan Carpenter
There were some curly braces missing so the probe() function always failed. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c index 25c6025..280c84e 100644 --- a/drivers/staging/media

[patch -longterm] V4L/DVB: v4l2-ioctl: integer overflow in video_usercopy()

2011-12-14 Thread Dan Carpenter
On a 32bit system the multiplication here could overflow. p-count is used in some of the V4L drivers. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- This is a patch against the 2.6.32-longterm kernel. In the stock kernel, this code was totally rewritten and fixed in 2010

re: [media] tm6000: rewrite IR support

2011-12-13 Thread Dan Carpenter
; 325 int err = -ENOMEM; 326 327 if (!ir) Old check. 328 return -ENODEV; 329 regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

[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

Re: [media] dib7090: add the reference board TFE7090E

2011-12-06 Thread Dan Carpenter
can make a patch in order to make sure that this code will not be detected as an error. Don't do that if you don't want to. This is fixable on the static checker side of things. regards, dan carpenter signature.asc Description: Digital signature

[patch] [media] xc5000: unlock on error in xc_load_fw_and_init_tuner()

2011-11-30 Thread Dan Carpenter
We recently added locking to this function, but we missed an error path which needs an unlock. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index 048f489..a3fcc59 100644 --- a/drivers/media/common

[patch v2] [media] saa7164: fix endian conversion in saa7164_bus_set()

2011-11-28 Thread Dan Carpenter
The msg-command field is 32 bits, and we should fill it with a call to cpu_to_le32(). The current code is broke on big endian systems. On little endian systems it truncates the 32 bit value to 16 bits which probably still works fine. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2

re: [media] dib7090: add the reference board TFE7090E

2011-11-28 Thread Dan Carpenter
} 1145 1146 if (state-rf_ramp[0] != 0) ^ This is the old dereference. 1147 dib0090_write_reg(state, 0x32, (3 11)); 1148 else regards, dan carpenter -- To unsubscribe from this list: send

Re: [patch] [media] saa7164: fix endian conversion in saa7164_bus_set()

2011-11-26 Thread Dan Carpenter
. regards, dan carpenter signature.asc Description: Digital signature

[patch 1/2] staging/media: lirc_imon: add a __user annotation

2011-11-24 Thread Dan Carpenter
in initializer (incompatible argument 2 (different address spaces)) lirc_imon.c:117:28:expected long ( *write )( ... ) lirc_imon.c:117:28:got long ( static [toplevel] *noident )( ... ) Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/staging/media/lirc/lirc_imon.c b/drivers

[patch 2/2] staging/media: lirc_imon: remove unused definitions

2011-11-24 Thread Dan Carpenter
We don't have these functions any more now we have module_usb_driver(). Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- I don't know if this goes in through USB or the media tree. diff --git a/drivers/staging/media/lirc/lirc_imon.c b/drivers/staging/media/lirc/lirc_imon.c index

[patch] [media] radio: NUL terminate a user string

2011-11-22 Thread Dan Carpenter
We pass this to fm_tx_set_radio_text() which expects a NUL terminated string. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c b/drivers/media/radio/wl128x/fmdrv_v4l2.c index 4f5c43d..077d369 100644 --- a/drivers/media/radio/wl128x

[patch] [media] saa7164: fix endian conversion in saa7164_bus_set()

2011-11-22 Thread Dan Carpenter
The msg-command field is 32 bits, and we should fill it with a call to cpu_to_le32(). The current code is broken on big endian systems, and on little endian systems it just truncates the 32 bit value to 16 bits. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- This is a static checker

[patch] [media] pwc: unlock on error in pwc_ioctl()

2011-11-13 Thread Dan Carpenter
In 82dfdada40 pwc: rework locking we changed the locking so that we handle it ourselves instead of doing it at the vl42 layer. There were a couple ioctls, VIDIOCPWCSLED and VIDIOCPWCGLED, where we didn't unlock on the error path. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git

Re: [PATCH 1/1] rc: Fix input deadlock and transmit error in redrat3 driver

2011-11-08 Thread Dan Carpenter
5588dc2 This would be easier to review it you put the changes to enable and disable into one patch and the changes so that we now measure the buffer length in bytes instead of ints into a second patch. regards, dan carpenter signature.asc Description: Digital signature

re: [media] V4L: soc-camera: make (almost) all client drivers re-usable outside of the framework

2011-11-07 Thread Dan Carpenter
work on 64 bit systems. regards, dan carpenter signature.asc Description: Digital signature

[patch] [media] V4L: mt9t112: use after free in mt9t112_probe()

2011-11-07 Thread Dan Carpenter
priv gets dereferenced in mt9t112_set_params() so we should return before calling that. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c index 32114a3..7b34b11 100644 --- a/drivers/media/video/mt9t112.c +++ b/drivers

Re: [RESEND PATCH 4/14] staging/media/as102: checkpatch fixes

2011-10-29 Thread Dan Carpenter
/media/as102/as10x_cmd.c patch: malformed patch at line 696: ___ I'm applying with patch not with git am. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

[patch] [media] av7110: wrong limiter in av7110_start_feed()

2011-10-18 Thread Dan Carpenter
, but I changed it to less than or equal to DMX_TS_PES_PCR (4). Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 3d20719..abf6b55 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci

Re: [PATCH 1/14] staging/media/as102: initial import from Abilis

2011-10-18 Thread Dan Carpenter
-DCONFIG_AS102_USB -Idrivers/media/dvb/dvb-core It sounds like you're going to do a resend to add in the Signed-off-by lines? It would be better to separate these two chunks out and put them at the end after you've fixed the compile errors in [PATCH 13/14]. regards, dan carpenter

Re: [PATCH 1/14] staging/media/as102: initial import from Abilis

2011-10-18 Thread Dan Carpenter
before patch 13/14, as drivers/staging/Makefile wasn't touch on patch 1/14. Ah sorry. My bad. regards, dan carpenter -- 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

Re: [PATCH 4/7] staging/as102: cleanup - formatting code

2011-10-16 Thread Dan Carpenter
about it. Julian was replying to problems that a specific patch introduced and everything he said was correct. Piotr was already going to redo the patches anyway. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

[patch v2] Staging: cx25821: off by one in cx25821_vidioc_s_input()

2011-10-13 Thread Dan Carpenter
If i is 2 then when we call cx25821_video_mux() we'd end up going past the end of the cx25821_boards[dev-board]-input[]. The INPUT() macro obfuscates what's going on in that function so it's a bit hard to follow. And as Mauro points out the hard coded 2 is not very helpful. Signed-off-by: Dan

Re: [patch] Staging: cx25821: off by on in cx25821_vidioc_s_input()

2011-10-12 Thread Dan Carpenter
of a 2 magic number. You're right. The hard coded 2 is not helpful... Why not just an: if (i = ARRAY_SIZE(cx25821_boards)) {... I'll send a patch to do that. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

Re: [patch] Staging: cx25821: off by on in cx25821_vidioc_s_input()

2011-10-12 Thread Dan Carpenter
Never mind. I figured out what you meant. I've fixed my patch and I will send v2 this evening. regards, dan carpenter -- 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

[patch] Staging: cx25821: off by on in cx25821_vidioc_s_input()

2011-10-07 Thread Dan Carpenter
If i is 2 then when we call cx25821_video_mux() we'd end up going past the end of the cx25821_boards[dev-board]-input[]. The INPUT() macro obfuscates what's going on in that function so it's a bit hard to follow. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- I don't have

[patch] [media] rc/ir-lirc-codec: cleanup __user tags

2011-10-06 Thread Dan Carpenter
: dereference of noderef expression Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 165ea8f..5faba2a 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b/drivers/media/rc/ir-lirc-codec.c @@ -99,7 +99,7

[patch] [media] mxl111sf: fix a couple precedence bugs

2011-09-29 Thread Dan Carpenter
Negate has higher precedence than bitwise AND. I2C_M_RD is 0x1 so the original code is equivelent to just checking if (!msg-flags). Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/dvb-usb/mxl111sf-i2c.c b/drivers/media/dvb/dvb-usb/mxl111sf-i2c.c index

[patch] [media] dib9000: release a lock on error

2011-09-29 Thread Dan Carpenter
This lock should be released as well on the error path. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c index e276b11..660f806 100644 --- a/drivers/media/dvb/frontends/dib9000.c +++ b/drivers/media

[patch] [media] ddbridge: fix ddb_ioctl()

2011-08-09 Thread Dan Carpenter
this changes later. 6) In the default case where an ioctl is not implemented then returning -ENOTTY is more appropriate than returning -EFAULT. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/dvb/ddbridge/ddbridge-core.c b/drivers/media/dvb/ddbridge/ddbridge-core.c index

[patch] [media] dib7000p: return error code on allocation failure

2011-08-06 Thread Dan Carpenter
The goto needs to be moved after the assignment. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c index a64a538..9c40267 100644 --- a/drivers/media/dvb/frontends/dib7000p.c +++ b/drivers/media/dvb

[patch] [media] dib9000: return error code on failure

2011-08-06 Thread Dan Carpenter
The ret = -EIO needs to be before the goto. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c index a085588..01e6b0c 100644 --- a/drivers/media/dvb/frontends/dib9000.c +++ b/drivers/media/dvb/frontends

Re: vp702x

2011-08-04 Thread Dan Carpenter
On Thu, Aug 04, 2011 at 12:21:29PM +0200, Florian Mickler wrote: Mauro, what to do? Apply the fix which Tino tested, perhaps? :P (obviously). The bug is present in 3.0 so it should be tagged for stable as well. regards, dan carpenter -- To unsubscribe from this list: send the line

[patch] [media] pwc: precedence bug in pwc_init_controls()

2011-07-23 Thread Dan Carpenter
'!' has higher precedence than '' so we need parenthesis here. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c index e9a0e94..8c70e64 100644 --- a/drivers/media/video/pwc/pwc-v4l.c +++ b/drivers/media/video/pwc

[patch] Staging: tm6000: remove unneeded check in get_next_buf()

2011-07-08 Thread Dan Carpenter
We dereference buf on the line before so if it were NULL here we would have OOPsed earlier. Also list_entry() never returns NULL. And finally, we handled the situation where the list is empty earlier in the function. So this test isn't needed and I've removed it. Signed-off-by: Dan Carpenter

[patch] [media] DVB: dvb_frontend: off by one in dtv_property_dump()

2011-05-26 Thread Dan Carpenter
If the tvp-cmd == DTV_MAX_COMMAND then we read past the end of the array. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 9827804..607e293 100644 --- a/drivers/media/dvb/dvb-core

[patch] [media] rc: double unlock in rc_register_device()

2011-05-26 Thread Dan Carpenter
If change_protocol() fails and we goto out_raw, then it calls unlock twice. I noticed that the other time we called change_protocol() we held the dev-lock, so I changed it to hold it here too. Signed-off-by: Dan Carpenter erro...@gmail.com --- Compile tested only. diff --git a/drivers/media/rc

[patch] [media] rc/redrat3: dereferencing null pointer

2011-05-26 Thread Dan Carpenter
In the original code, if the allocation failed we dereference rr3 when it was NULL. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 5147767..4582ef7 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c

[bug report] cxd2820r: dynamically allocated arrays

2011-05-25 Thread Dan Carpenter
:743:28: error: bad constant expression drivers/media/dvb/frontends/cxd2820r_core.c:748:32: error: cannot size expression drivers/media/dvb/frontends/cxd2820r_core.c:762:31: error: cannot size expression CC [M] drivers/media/dvb/frontends/cxd2820r_core.o regards, dan carpenter

Re: [PATCH] tm6000: fix vbuf may be used uninitialized (Dmitri please read)

2011-04-12 Thread Dan Carpenter
already miss a patch posted to linux-media addressing it?) My laptop was stolen so I can't review code for the next couple weeks. I remember that I thought your patch looked correct, but I was hoping that Dmitri would Ack it. regards, dan carpenter -- To unsubscribe from this list: send the line

Re: [PATCH 3/6] [media] pvrusb2: check for allocation failures

2011-03-26 Thread Dan Carpenter
On Fri, Mar 25, 2011 at 11:33:36PM -0500, Mike Isely wrote: Acked-By: Mike Isely is...@pobox.com I'd need to reformat this one to get it to apply... :/ It doesn't actually fix the bug so it's not worth it. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe

[PATCH 1/6] [media] pvrusb2: white space changes

2011-03-25 Thread Dan Carpenter
was on its own line but it wasn't the start of a function. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c index ca9f83a..a5d4867 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-std.c +++ b

[PATCH 2/6] [media] pvrusb2: fix remaining checkpatch.pl complaints

2011-03-25 Thread Dan Carpenter
* Include linux/string.h instead of asm/string.h. * Remove unneeded curly braces. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c index a5d4867..370a9ab 100644 --- a/drivers/media/video/pvrusb2

[PATCH 3/6] [media] pvrusb2: check for allocation failures

2011-03-25 Thread Dan Carpenter
This function returns NULL on failure so lets do that if kzalloc() fails. There is a separate problem that the caller for this function doesn't check for errors... Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video

[PATCH 4/6] [media] pvrusb2: fix camel case variables

2011-03-25 Thread Dan Carpenter
This patch renames some variables to bring them more in line with kernel CodingStyle. arrPtr = arr arrSize = arr_size bufPtr = buf bufSize = buf_size Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2

[PATCH 5/5] [media] pvrusb2: delete generic_standards_cnt

2011-03-25 Thread Dan Carpenter
The generic_standards_cnt define is only used in one place and it's more readable to just call ARRAY_SIZE(generic_standards) directly. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c index d5a679f

[PATCH 6/6] [media] pvrusb2: replace !0 with 1

2011-03-25 Thread Dan Carpenter
Using !0 is less readable than just saying 1. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c index 9bebc08..ca4f67b 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-std.c +++ b/drivers/media/video

Re: [PATCH] tm6000: fix vbuf may be used uninitialized

2011-03-24 Thread Dan Carpenter
a real bug versus just a GCC warning. It was introduced in 8aff8ba95155df [media] tm6000: add radio support to the driver. I've added Dmitri to the CC list. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

[patch 1/2] [media] stv0367: signedness bug in stv0367_get_tuner_freq()

2011-03-06 Thread Dan Carpenter
We use err to store negative error codes so it should be signed. And if we return an error from stv0367_get_tuner_freq() that needs to be handled properly as well. (param-frequency is a u32). Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/dvb/frontends/stv0367.c b

[patch 2/2] [media] stv0367: typo in function parameter

2011-03-06 Thread Dan Carpenter
The CellsCoeffs arrays are [3][6][5] not [2][6][5]. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c index 7117ce9..ec9de40 100644 --- a/drivers/media/dvb/frontends/stv0367.c +++ b/drivers/media/dvb

[patch v2] [media] stv090x: handle allocation failures

2011-02-15 Thread Dan Carpenter
an additional leak that I missed in the first version of this patch. Signed-off-by: Dan Carpenter erro...@gmail.com --- v2: Fix the leak Oliver noticed. diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index d3362d0..41d0f0a 100644 --- a/drivers/media/dvb

[patch] [media] stv090x: handle allocation failures

2011-02-07 Thread Dan Carpenter
kmalloc() can fail so check whether state-internal is NULL. append_internal() can return NULL on allocation failures so check that. Also if we hit the error condition later in the function then there is a memory leak and we need to call remove_dev() to fix it. Signed-off-by: Dan Carpenter erro

[patch 1/2] [media] dib8000: fix small memory leak on error

2011-01-19 Thread Dan Carpenter
kfree(state) if fe allocation fails. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c index 3e20aa8..c1c3e26 100644 --- a/drivers/media/dvb/frontends/dib8000.c +++ b/drivers/media/dvb/frontends/dib8000.c

[patch 1/2] [media] dib9000: fix return type in dib9000_mbx_send_attr()

2011-01-19 Thread Dan Carpenter
dib9000_mbx_send_attr() returns an int. It doesn't work to save negative error codes in an unsigned char, so I've made ret an int type. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c index 43fb6e4

[patch v2] [media] av7110: check for negative array offset

2011-01-07 Thread Dan Carpenter
info-num comes from the user. It's type int. If the user passes in a negative value that would cause memory corruption. Signed-off-by: Dan Carpenter erro...@gmail.com --- V2: change the check instead of making num and unsigned int diff --git a/drivers/media/dvb/ttpci/av7110_ca.c b/drivers

Re: [patch] [media] av7110: make array offset unsigned

2011-01-07 Thread Dan Carpenter
in the userspace API? Who would notice? (I'm still quite a newbie at system programming). regards, dan carpenter -- 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

[patch v3] [media] av7110: check for negative array offset

2011-01-07 Thread Dan Carpenter
info-num comes from the user. It's type int. If the user passes in a negative value that would cause memory corruption. Signed-off-by: Dan Carpenter erro...@gmail.com --- V2: change the check instead of making num and unsigned int V3: white space changes diff --git a/drivers/media/dvb/ttpci

Re: [PATCH 03/15]drivers:staging:rtl8187se:r8180_hw.h Typo change diable to disable.

2011-01-01 Thread Dan Carpenter
0x0100 no! I changed it to disabled to make it proper.. Finn is obviously right, but maybe a compromise would be: Only the value EEPROM_SW_AD_ENABLE means enable, other values mean disable. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH 02/15]drivers:spi:dw_spi.c Typo change diable to disable.

2010-12-31 Thread Dan Carpenter
On Fri, Dec 31, 2010 at 06:17:58AM -0800, Justin P. Mattock wrote: Wrong: [PATCH 02/15]drivers:spi:dw_spi.c Typo change diable to disable. Right: [PATCH 02/15] spi/dw_spi: Typo change diable to disable regards, dan carpenter alright.. so having the backlash is alright

Re: [PATCH 15/15]drivers:spi:dw_spi.c Typo change diable to disable.

2010-12-30 Thread Dan Carpenter
: /* Set the interrupt mask, for poll mode just diable all int */ ^^ regards, dan carpenter -- 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

[patch] [media] cx231xx: use bitwise negate instead of logical

2010-12-27 Thread Dan Carpenter
Bitwise negate was intended here. INPUT_SEL_MASK is 0x30. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c index d52955c..c53e972 100644 --- a/drivers/media/video/cx231xx/cx231xx-avcore.c

smatch report: cx231xx: incorrect check in cx231xx_write_i2c_data()

2010-12-23 Thread Dan Carpenter
) 1645 saddr = 0xff; We check saddr_len == 0 twice which doesn't make sense. I'm not sure what the correct fix is though. It's been this way since the driver was merged. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body

Re: smatch report: cx231xx: incorrect check in cx231xx_write_i2c_data()

2010-12-23 Thread Dan Carpenter
() regards, dan carpenter -- 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] [media] cx231xxx: fix typo in saddr_len check

2010-12-23 Thread Dan Carpenter
The original code compared saddr_len with zero twice in a nonsensical way. I asked the list, and Andy Walls and Sri Deevi say that the second check should be if saddr_len == 1. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/cx231xx/cx231xx-core.c b/drivers

[patch -next] [media] timblogiw: too large value for strncpy()

2010-12-20 Thread Dan Carpenter
This is a copy and paste error. It should be using sizeof(cap-driver) instead of sizeof(cap-card). Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c index cf48aa9..ef1b7a5 100644 --- a/drivers/media/video/timblogiw.c

[patch v2] [media] bttv: take correct lock in bttv_open()

2010-12-12 Thread Dan Carpenter
/show_bug.cgi?id=24602 Signed-off-by: Dan Carpenter erro...@gmail.com --- Sergej could you test this one? diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index a529619..6c8f4b0 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media

[patch] [media] zoran: bit-wise vs logical and

2010-12-10 Thread Dan Carpenter
zr-frame_num is a counter and was intended here instead of . Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/zoran/zoran_device.c b/drivers/media/video/zoran/zoran_device.c index b02007e..e8a2784 100644 --- a/drivers/media/video/zoran/zoran_device.c +++ b

Re: [patch] [media] bttv: call mutex_init() on newly allocated lock

2010-12-10 Thread Dan Carpenter
...@redhat.com I'm taking off for the weekend, so I won't be able to look at this more until Monday. See you then. :) regards, dan carpenter -- 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

[patch] [media] bttv: call mutex_init() on newly allocated lock

2010-12-09 Thread Dan Carpenter
Hi Sergej, I'm hoping this patch will take care of the bug you reported: https://bugzilla.kernel.org/show_bug.cgi?id=24602 Please try it out and let me know. I'll resend with a proper signed-off-by if it fixes the problem. (I don't have the hardware to test this myself). diff --git

Re: [PATCH] media: rc: ir-lirc-codec: fix potential integer overflow

2010-12-01 Thread Dan Carpenter
) Wait, what? We just checked this a couple lines before. The rest of the patch is right and a clever catch. It would affect x86_64 systems and not i386. This doesn't have security implications does it? You'd just catch the kmalloc() stack trace for insanely large allocations. regards, dan

[patch] [media] saa7164: poll mask set incorrectly

2010-11-23 Thread Dan Carpenter
list_first_entry() always returns non-null here. I think the intent was to test whether there were any entries in the used list. Signed-off-by: Dan Carpenter erro...@gmail.com --- I don't have this hardware so I can't test this. Please check carefully. diff --git a/drivers/media/video/saa7164

[patch] [media] bt8xx: missing unlock in bttv_overlay()

2010-11-17 Thread Dan Carpenter
There is a missing unlock here. This was introduced as part of BKL removal in c37db91fd0d4 V4L/DVB: bttv: fix driver lock and remove explicit calls to BKL Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv

[patch] [media] cx231xx: stray unlock on error path

2010-11-17 Thread Dan Carpenter
The lock isn't held here and doesn't need to be unlocked. The code has been like this since the driver was merged. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 56c2d81..b7b905f

[patch 1/3] [media] lirc_dev: stray unlock in lirc_dev_fop_poll()

2010-11-16 Thread Dan Carpenter
We shouldn't unlock here. I think this was a cut and paste error. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c index 8418b14..8ab9d87 100644 --- a/drivers/media/IR/lirc_dev.c +++ b/drivers/media/IR/lirc_dev.c @@ -522,10

[patch 2/3] [media] lirc_dev: add some __user annotations

2010-11-16 Thread Dan Carpenter
:27:got int ( extern [toplevel] *noident )( ... ) Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h index 54780a5..630e702 100644 --- a/include/media/lirc_dev.h +++ b/include/media/lirc_dev.h @@ -217,9 +217,9 @@ int lirc_dev_fop_open

[patch 3/3] [media] lirc_dev: fixes in lirc_dev_fop_read()

2010-11-16 Thread Dan Carpenter
is invalid now, there was another debug print that I removed. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c index fbca94f..6b9fc74 100644 --- a/drivers/media/IR/lirc_dev.c +++ b/drivers/media/IR/lirc_dev.c @@ -647,18 +647,18 @@ ssize_t

[patch] [media] saa7164: make buffer smaller

2010-11-01 Thread Dan Carpenter
() and it always is less than 16 characters so we can easily make the buffer smaller. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h index 1d9c5cb..8b3e844 100644 --- a/drivers/media/video/saa7164/saa7164.h

Re: [patch 2/3] V4L/DVB: s5p-fimc: make it compile

2010-10-22 Thread Dan Carpenter
patch so I could handle it and add you as reported by it is OK. I thought it was probably a merge conflict. Thanks for taking care of this. regards, dan carpenter Regards, Sylwester ret = fimc_register_m2m_device(fimc); if (ret) goto err_irq; -- To unsubscribe from

Re: [patch 3/3] V4L/DVB: s5p-fimc: dubious one-bit signed bitfields

2010-10-22 Thread Dan Carpenter
On Fri, Oct 22, 2010 at 09:10:57AM +0200, Sylwester Nawrocki wrote: -Original Message- From: Dan Carpenter [mailto:erro...@gmail.com] Sent: Thursday, October 21, 2010 9:24 PM To: Mauro Carvalho Chehab Cc: Kyungmin Park; Sylwester Nawrocki; Pawel Osciak; Marek Szyprowski; linux

[patch] V4L/DVB: cx231xx: fix double lock typo

2010-10-21 Thread Dan Carpenter
This was supposed to be an unlock on the error path. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/cx231xx/cx231xx-i2c.c b/drivers/media/video/cx231xx/cx231xx-i2c.c index cce74e5..8356706 100644 --- a/drivers/media/video/cx231xx/cx231xx-i2c.c +++ b/drivers

[patch 1/3] V4L/DVB: s5p-fimc: add unlock on error path

2010-10-21 Thread Dan Carpenter
There was an unlock missing if kzalloc() failed. Signed-off-by: Dan Carpenter erro...@gmail.com diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c index 1802701..8335045 100644 --- a/drivers/media/video/s5p-fimc/fimc-core.c +++ b/drivers/media/video

<    1   2   3   4   5   6   7   >