linux-media@vger.kernel.org

2012-04-22 Thread Dan Carpenter
0x0804. Signed-off-by: Dan Carpenter diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index 392d4be..fba611e 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c @@ -197,7 +197,7 @@ static int fintek_hw_detect(struct fintek_dev *fintek

Re: [patch] [media] ngene: remove an unneeded condition

2012-04-28 Thread Dan Carpenter
On Sat, Apr 28, 2012 at 04:57:35PM +0200, walter harms wrote: > > > Am 20.04.2012 15:15, schrieb Dan Carpenter: > > "stat" is always zero here. The condition used to be needed, but we > > shifted stuff around in 0f0b270f90 "[media] ngene: CXD2099AR Common

[patch] [media] gspca: passing wrong length parameter to reg_w()

2012-05-01 Thread Dan Carpenter
This looks like a cut an paste error. This is a two byte array but we use 8 as a length parameter. Signed-off-by: Dan Carpenter --- This is a static checker fix. I don't own the hardware. diff --git a/drivers/media/video/gspca/conex.c b/drivers/media/video/gspca/conex.c index ea

Re: [patch] [media] gspca: passing wrong length parameter to reg_w()

2012-05-02 Thread Dan Carpenter
eanup. > Maybe the fix could have been > > reg_w(gspca_dev, 0x0010, reg10, sizeof reg10); > > but it is OK for me. > > Acked-by: Jean-Francois Moine <http://moinejf.free.fr> Thanks. regards, dan carpenter -- To unsubscribe from this list: send the line "u

Re: [PATCH 1/2] staging: media: go7007: Adlink MPG24 board

2012-05-13 Thread Dan Carpenter
example? That might have security implications and be good thing to know about. 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

Re: [PATCH 2/2] staging: media: go7007: Adlink MPG24 board

2012-05-13 Thread Dan Carpenter
wise > This patch as well has a lot of good stuff in it, but it needs to be broken up. 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

Re: [PATCH 1/2] staging: media: go7007: Adlink MPG24 board

2012-05-14 Thread Dan Carpenter
te commits by the way. Just use "git citool", highlight the lines you want, right click, and choose "commit selected lines". regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@v

Re: [PATCH 1/2] staging: media: go7007: Adlink MPG24 board

2012-05-14 Thread Dan Carpenter
On Mon, May 14, 2012 at 01:25:43PM +0400, vol...@telros.ru wrote: > On Mon, May 14, 2012 at 12:04:15PM +0300, Dan Carpenter wrote: > > On Mon, May 14, 2012 at 12:09:18PM +0400, vol...@telros.ru wrote: > > > It`s very horrible to describe every changing... > > > &g

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

2012-05-15 Thread Dan Carpenter
L then we will oops in cx23885_dvb_set_frontend(). Also if "fe" is NULL we'll oops right here. 138 } 139 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

bug report: null dereference in error handling in mantis_dvb_init()

2012-05-17 Thread Dan Carpenter
tend() was added but it can't handle NULL pointers. 252 dvb_frontend_detach(mantis->fe); 253 err4: 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

Re: [PATCH] drivers/media/video/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get

2012-08-06 Thread Dan Carpenter
oremap(&pdev->dev, res_emma); > if (!pcdev->base_emma) > goto rel_vdev; This was in the original code, but there is a "ret = -ENOMEM;" missing here, and again a couple lines down in the original code. regards, dan carpenter -- To unsubscribe from

Re: [PATCH] drivers/media/video/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get

2012-08-06 Thread Dan Carpenter
On Mon, Aug 06, 2012 at 05:23:23PM +0300, Dan Carpenter wrote: > On Sat, Aug 04, 2012 at 08:23:27PM +0200, Julia Lawall wrote: > > @@ -922,12 +920,7 @@ static int emmaprp_probe(struct platform_device *pdev) > > > > platform_set_drvdata(pdev, pcdev); > > > >

[patch] [media] qt1010: signedness bug in qt1010_init_meas1()

2012-08-10 Thread Dan Carpenter
qt1010_init_meas2() returns zero on success and negative error codes on failure so the return type should be int instead of u8. Signed-off-by: Dan Carpenter diff --git a/drivers/media/common/tuners/qt1010.c b/drivers/media/common/tuners/qt1010.c index 2d79b1f..bdc39e1 100644 --- a/drivers

re: [media] s2255drv: remove V4L2_FL_LOCK_ALL_FOPS

2012-08-13 Thread Dan Carpenter
int ret; 1866 1867 if (!fh) ^^^ Old check. 1868 return -ENODEV; 1869 dprintk(4, "%s, vma=0x%08lx\n", __func__, (unsigned long)vma); regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe

re: [media] lmedm04: fix build

2012-08-13 Thread Dan Carpenter
expects this parameter to equal to sizeof(data) or smaller instead of 265. 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] it913x-fe: use ARRAY_SIZE() as a cleanup

2012-08-13 Thread Dan Carpenter
This code looks suspicious, but it turns out that "nv" is an array of u8 so sizeof() is the same as ARRAY_SIZE(). Using ARRAY_SIZE() is more readable though. Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb/frontends/it913x-fe.c b/drivers/media/dvb/frontends/it913x-

[patch] [media] em28xx: use after free in em28xx_v4l2_close()

2012-08-13 Thread Dan Carpenter
We need to move the unlock before the kfree(dev); Signed-off-by: Dan Carpenter --- Applies to linux-next. diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index ecb23df..78d6ebd 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b

[patch] [media] mem2mem_testdev: unlock and return error code properly

2012-08-13 Thread Dan Carpenter
We recently added locking to this function, but there was an error path which accidentally returned holding a lock. Also we returned zero on failure on some paths instead of the error code. Signed-off-by: Dan Carpenter --- Applies to linux-next. diff --git a/drivers/media/video

[patch] [media] stk1160: unlock on error path stk1160_set_alternate()

2012-08-14 Thread Dan Carpenter
There are some unlocks missing on error. Signed-off-by: Dan Carpenter --- Applies on top of linux-next. diff --git a/drivers/media/video/stk1160/stk1160-v4l.c b/drivers/media/video/stk1160/stk1160-v4l.c index 360bdbe..1ad4ac1 100644 --- a/drivers/media/video/stk1160/stk1160-v4l.c +++ b/drivers

[patch] [media] stk1160: remove unneeded check

2012-08-14 Thread Dan Carpenter
"card" is a valid pointer here because we checked snd_card_create() for error returns. Checking after a dereference makes the static checkers complain. Signed-off-by: Dan Carpenter --- Only needed on linux-next. diff --git a/drivers/media/video/stk1160/stk1160-ac97.c b/drivers/m

Re: [patch] [media] em28xx: use after free in em28xx_v4l2_close()

2012-08-14 Thread Dan Carpenter
On Tue, Aug 14, 2012 at 07:50:12AM -0300, Ezequiel Garcia wrote: > Hi Dan, > > On Tue, Aug 14, 2012 at 3:58 AM, Dan Carpenter > wrote: > > We need to move the unlock before the kfree(dev); > > > > Signed-off-by: Dan Carpenter > > --- > > Applies t

[bug report] buffer overflow in redrat3_transmit_ir()

2012-08-15 Thread Dan Carpenter
curlencheck++; 950 } else { 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] rc: divide by zero bugs in s_tx_carrier()

2012-08-18 Thread Dan Carpenter
"carrier" comes from a get_user() in ir_lirc_ioctl(). We need to test that it's not zero before using it as a divisor. Signed-off-by: Dan Carpenter diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index 647dd95..d05ac15 100644 --- a/drivers/media/rc/ene_ir.

[patch v2] [media] rc-core: prevent divide by zero bug in s_tx_carrier()

2012-09-09 Thread Dan Carpenter
Several of the drivers use carrier as a divisor in their s_tx_carrier() functions. We should do a sanity check here like we do for LIRC_SET_REC_CARRIER. Signed-off-by: Dan Carpenter --- v2: Ben Hutchings pointed out that my first patch was not a complete fix. diff --git a/drivers/media/rc

Re: [PATCH 01/10] staging: media: go7007: Some additional code for TW2804 driver functionality

2012-09-10 Thread Dan Carpenter
rl, > + .querymenu = v4l2_subdev_querymenu, > + .s_std = tw2804_s_std, > +}; > + > +static int tw2804_s_video_routing(struct v4l2_subdev *sd, u32 input, u32 > output, > + u32 config) > +{ > + struct wis_tw2804 *dec = to_state(sd); > + struct i2c_

[patch v3] [media] rc: divide by zero bugs in s_tx_carrier()

2012-09-11 Thread Dan Carpenter
re subtle. The ->carrier is passed to mod_freq_to_val() which uses it as a divisor. Signed-off-by: Dan Carpenter --- v2: tried to add the check to ir_lirc_ioctl() but that doesn't work. v3: the same as v1 except that I've added a fix for redrat3 as well. diff --git a/drivers/media/rc

[patch] [media] rc-core: fix return codes in ir_lirc_ioctl()

2012-09-11 Thread Dan Carpenter
These should be -ENOSYS because not -EINVAL. Reported-by: Sean Young Signed-off-by: Dan Carpenter diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 6ad4a07..c0dc1b9 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b/drivers/media/rc/ir-lirc-codec.c

Re: [PATCH] drivers/media: Removes useless kfree()

2012-09-12 Thread Dan Carpenter
ou had fixed this the same as the others and removed the goto. Also the printk is redundant and wrong. Remove it too. 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

Re: [PATCH v2 7/8] drivers/media/platform/davinci/vpbe.c: Removes useless kfree()

2012-09-12 Thread Dan Carpenter
ould not be numbers because this is not GW-BASIC. The label should reflect what happens on the next line. Labeling the place after the goto location where you started from is always nonsense. 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

Re: Freeze or Oops on recent kernels

2012-09-23 Thread Dan Carpenter
file a bug report and attach the .jpg. regards, dan carpenter On Fri, Sep 07, 2012 at 09:24:13PM +1000, yvahk-xre...@zacglen.net wrote: > > I am getting either a a kernel Oops or freeze (without any console output) > on recent kernels. I have tested on 2.6.32.26 PAE, 3.1.9 PAE, and 3.4.9 PAE

re: [media] v4l2-subdev: add support for the new edid ioctls

2012-09-26 Thread Dan Carpenter
p;edid->edid; 2207 *array_size = edid->blocks * 128; ^^ This can overflow. 2208 ret = 1; 2209 } 2210 break; 2211 } regards, dan carpenter -- To

Re: [patch] [media] media: info leak in __media_device_enum_links()

2013-05-31 Thread Dan Carpenter
Ping? regards, dan carpenter On Sat, Apr 13, 2013 at 12:32:15PM +0300, Dan Carpenter wrote: > These structs have holes and reserved struct members which aren't > cleared. I've added a memset() so we don't leak stack information. > > Signed-off-by: Dan Carpenter >

[patch] [media] staging: lirc: clean error handling in probe()

2013-06-26 Thread Dan Carpenter
I have reorganized the error handling into a simpler and more canonical format. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/media/lirc/lirc_igorplugusb.c b/drivers/staging/media/lirc/lirc_igorplugusb.c index 2faa391..4cf3933 100644 --- a/drivers/staging/media/lirc

Re: [patch] [media] staging: lirc: clean error handling in probe()

2013-06-26 Thread Dan Carpenter
On Wed, Jun 26, 2013 at 11:00:40AM +0300, Andy Shevchenko wrote: > On Wed, 2013-06-26 at 10:53 +0300, Dan Carpenter wrote: > > I have reorganized the error handling into a simpler and more canonical > > format. > > Since you reorganize error handling, might be worth to

Re: [PATCH v2] staging: lirc: clean error handling in probe()

2013-06-26 Thread Dan Carpenter
On Wed, Jun 26, 2013 at 05:37:36PM +0300, Andy Shevchenko wrote: > From: Dan Carpenter > > We have reorganized the error handling into a simpler and more canonical > format. > > Additionally we removed extra empty lines, switched to devm_kzalloc(), and > substitute &#

Re: [PATCH v2] staging: lirc: clean error handling in probe()

2013-06-26 Thread Dan Carpenter
On Wed, Jun 26, 2013 at 06:29:12PM +0300, Andy Shevchenko wrote: > On Wed, 2013-06-26 at 18:10 +0300, Dan Carpenter wrote: > > On Wed, Jun 26, 2013 at 05:37:36PM +0300, Andy Shevchenko wrote: > > > From: Dan Carpenter > > > > > > We have reorganized the er

[patch] [media] cx25821: testing the wrong variable

2012-09-29 Thread Dan Carpenter
->input_filename could be NULL here. The intent was to test ->_filename. Signed-off-by: Dan Carpenter --- I'm not totally convinced that using /root/vid411.yuv is the right idea. diff --git a/drivers/media/pci/cx25821/cx25821-video-upstream.c b/drivers/media/pci/cx25821/cx

Re: [patch] [media] cx25821: testing the wrong variable

2012-09-29 Thread Dan Carpenter
On Sat, Sep 29, 2012 at 12:52:38PM +0200, walter harms wrote: > > > Am 29.09.2012 09:12, schrieb Dan Carpenter: > > ->input_filename could be NULL here. The intent was to test > > ->_filename. > > > > Signed-off-by: Dan Carpenter > > --- > >

re: [media] af9035: add Avermedia Volar HD (A867R) support

2012-10-02 Thread Dan Carpenter
requency *= -1; 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

re: V4L/DVB (13678): Add support for yet another DvbWorld, TeVii and Prof USB devices

2012-10-10 Thread Dan Carpenter
registers */ 295 dw210x_op_rw(d->udev, 0xc3, 0xd1 , 0, 296 ibuf, msg[1].len + 2, DW210X_READ_MSG); 297 memcpy(msg[1].buf, ibuf + 2, msg[1].len); 298 299 break; 300 } regards

[patch 1/2] [media] rc: unlock on error in show_protocols()

2012-11-27 Thread Dan Carpenter
We recently introduced a new return -ENODEV in this function but we need to unlock before returning. Signed-off-by: Dan Carpenter diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 601d1ac1..d593bc6 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c

[patch 2/2] [media] rc: unlock on error in store_protocols()

2012-11-27 Thread Dan Carpenter
This error path is missing the unlock. Signed-off-by: Dan Carpenter diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 601d1ac1..759a40a 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -890,7 +892,8 @@ static ssize_t store_protocols(struct

Re: [PATCH v3 0/9] Media Controller capture driver for DM365

2012-11-28 Thread Dan Carpenter
I wish people wouldn't submit big patches right before the merge window opens... :/ It's better to let it sit in linux-next for a couple weeks so people can mess with it a bit. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-media&qu

Re: [PATCH v3 0/9] Media Controller capture driver for DM365

2012-11-28 Thread Dan Carpenter
On Wed, Nov 28, 2012 at 12:56:10PM +0100, Hans Verkuil wrote: > On Wed 28 November 2012 12:45:37 Dan Carpenter wrote: > > I wish people wouldn't submit big patches right before the merge > > window opens... :/ It's better to let it sit in linux-next for a > > coupl

Re: [PATCH v3 0/9] Media Controller capture driver for DM365

2012-11-28 Thread Dan Carpenter
kernel last week so no one should have expected to merge new drivers this week anyway. 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

Re: [PATCH v3 0/9] Media Controller capture driver for DM365

2012-11-28 Thread Dan Carpenter
On Wed, Nov 28, 2012 at 08:30:04PM +0100, Sylwester Nawrocki wrote: > On 11/28/2012 01:22 PM, Dan Carpenter wrote: > > In the end this is just a driver, and I don't especially care. But > > it's like not just this one which makes me frustrated. I really > > be

[patch] [media] mantis: cleanup NULL checking in mantis_ca_exit()

2012-12-02 Thread Dan Carpenter
Smatch complainst that the call to mantis_evmgr_exit() dereferences "ca" but then we check it for NULL on the next line. I've moved the NULL check forward to avoid that. Signed-off-by: Dan Carpenter --- There aren't any callers for this function. It is commented out in mant

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

2012-01-03 Thread Dan Carpenter
gt; +static bool noregister = 0; > +static bool probeonly = 0; > +static bool idonly = 0; > +static bool bailearly = 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
*/ 135 cx23885_dvb_set_frontend(fe->dvb.frontend); 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.

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 s

linux-media@vger.kernel.org

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 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 --- Compile tested only. Please review carefully. diff --git a/drivers/medi

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

2012-01-04 Thread Dan Carpenter
-l 211 Cc: stable Signed-off-by: Dan Carpenter 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 { #define V4L2_CTRL_FLAG_NEXT_C

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

2012-01-04 Thread Dan Carpenter
211 Signed-off-by: Dan Carpenter 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 0x8000 /* U

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

2012-01-05 Thread Dan Carpenter
On Thu, Jan 05, 2012 at 08:43:58AM -0800, Greg KH wrote: > On Thu, Jan 05, 2012 at 09:28:22AM +0300, Dan Carpenter wrote: > > If p->count is too high the multiplication could overflow and > > array_size would be lower than expected. Mauro and Hans Verkuil > > suggeste

linux-media@vger.kernel.org

2012-01-09 Thread Dan Carpenter
asn't a bool it would be a problem. The other 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] 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 --- Compile tested only. I don't think there is anything else that needs to be done before returning, but it would be great if someone

[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 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/medi

[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 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/cx23

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

2012-01-13 Thread Dan Carpenter
MODULATION, 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 Mo

[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 diff --git a/drivers/media/video/saa7164/saa7164-cards.c b/drivers/media/video/saa7164/saa7164-cards.c index 971591d..5b72da5 100644

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

2012-01-15 Thread Dan Carpenter
e on error and zero on success. Signed-off-by: Dan Carpenter 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 +374,7 @@ static i

linux-media@vger.kernel.org

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 diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index 9387770..af65d01 100644 --- a/drivers/media/dvb

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

2012-01-16 Thread Dan Carpenter
st but use "snr_reading - 1" as the array offset. I've done the same thing here. Signed-off-by: Dan Carpenter 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/dr

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 > >

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

2012-01-19 Thread Dan Carpenter
y is -1. > It's a good point. I will redo the patch. regards, dan carpenter signature.asc Description: Digital signature

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

2012-01-21 Thread Dan Carpenter
On Thu, Jan 19, 2012 at 03:22:02PM +0300, Dan Carpenter wrote: > It's a good point. I will redo the patch. Sorry, I've decided to bail on this. The original code is buggy but I don't know what's going on well enough to fix it with any confidence. regards, dan car

[patch] [media] az6007: precedence bug in az6007_i2c_xfer()

2012-01-25 Thread Dan Carpenter
The intent here was to test that the flag was clear but the '!' has higher precedence than the '&'. I2C_M_RD is 0x1 so the current code is equivalent to "&& (!sgs[i].flags) ..." Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb/dvb-usb/az60

[patch 1/2] [media] s2255drv: cleanup vidioc_enum_fmt_cap()

2012-02-16 Thread Dan Carpenter
"f" wasn't checked consistently, so static checkers complain. This function is always called with a valid "f" pointer, so I have removed the check. Also the indenting was messed up. Signed-off-by: Dan Carpenter diff --git a/drivers/media/video/s2255drv.c b/drivers/med

[patch 2/2] [media] s2255drv: fix some endian bugs

2012-02-16 Thread Dan Carpenter
I don't have this hardware and I don't know the subsystem very well. So please review this patch carefully. The original code definitely looks buggy though. Sparse complains about some endian bugs where little endian bugs are treated as cpu endian. Signed-off-by: Dan Carpenter ---

Re: [PATCH 5/9] staging: easycap: Push video registration to easycap_register_video()

2012-02-24 Thread Dan Carpenter
slow you down. But it would have been better to return rc here. regards, dan carpenter signature.asc Description: Digital signature

Re: [PATCH 9/9] staging: easycap: Split easycap_delete() into several pieces

2012-02-24 Thread Dan Carpenter
On Fri, Feb 24, 2012 at 12:24:22PM -0300, Ezequiel Garcia wrote: > + /* Free video urbs */ > + free_video_urbs(peasycap); These comments aren't redundant. Could you remove them in a later patch? regards, dan carpenter signature.asc Description: Digital signature

re: [media] DVB: add support for the LG2160 ATSC-MH demodulator

2012-05-21 Thread Dan Carpenter
g2160_init)); The last element of the lg2160_init[] array looks useful. 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

re: [media] v4l/dvb: fix compiler warnings

2012-05-21 Thread Dan Carpenter
ich is turned off by default because there are too many of them and they are mostly useless. And instead we got this warning which is turned on by default and usually indicates a nasty bug... Grrr... :P regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linu

Re: [PATCH] lg2160: fix off-by-one error in lg216x_write_regs

2012-05-21 Thread Dan Carpenter
On Mon, May 21, 2012 at 11:58:06AM -0400, Michael Krufky wrote: > eeek! spelling error in dan's name! my apologies. I will correct > this in my tree before I ask Mauro to merge it. > Hehe. Also since you're redoing it, could you change the Thanks-to: to Reported-by:? reg

[patch] [media] videobuf-dma-contig: use gfp_t for GFP flags

2012-05-24 Thread Dan Carpenter
videobuf-dma-contig.c:47:65:got unsigned long Signed-off-by: Dan Carpenter diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index b6b5cc1..9b9a06f 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c

re: [media] DRX-K: Initial check-in

2012-06-08 Thread Dan Carpenter
c:3847 SetDVBT() warn: x |= 0 drivers/media/dvb/frontends/drxk_hard.c:3888 SetDVBT() warn: x |= 0 drivers/media/dvb/frontends/drxk_hard.c:3915 SetDVBT() warn: x |= 0 drivers/media/dvb/frontends/drxk_hard.c:3931 SetDVBT() warn: x |= 0 regards, dan carpenter -- To unsubscribe from this list: send the

linux-media@vger.kernel.org

2012-06-09 Thread Dan Carpenter
The test here is never true because '&' was used instead of '|'. It was the same as: if (status & ((1<<16) & (1<<17)) ... Signed-off-by: Dan Carpenter --- I don't have this hardware and this one really should be tested or checked by

re: Staging: solo6x10: New driver (staging) for Softlogic 6x10

2012-06-09 Thread Dan Carpenter
s/staging/media/solo6x10/tw28.c:362 tw2815_setup() warn: x |= 0 drivers/staging/media/solo6x10/tw28.c:367 tw2815_setup() warn: x |= 0 drivers/staging/media/solo6x10/tw28.c:373 tw2815_setup() warn: x |= 0 drivers/staging/media/solo6x10/tw28.c:383 tw2815_setup() warn: x |= 0 regards, dan carpenter --

Re: [media] DRX-K: Initial check-in

2012-06-10 Thread Dan Carpenter
On Sun, Jun 10, 2012 at 09:42:22PM +0200, Ralph Metzler wrote: > Dan Carpenter writes: > > Hello Ralph Metzler, > > > > The patch 43dd07f758d8: "[media] DRX-K: Initial check-in" from Jul 3, > > 2011, leads to the following warning: > > d

linux-media@vger.kernel.org

2012-06-10 Thread Dan Carpenter
On Sat, Jun 09, 2012 at 10:47:32AM +0300, Dan Carpenter wrote: > The test here is never true because '&' was used instead of '|'. It was > the same as: > > if (status & ((1<<16) & (1<<17)) ... > > Signed-off-by: Dan Carpenter

re: V4L/DVB (12730): Add conexant cx25821 driver

2012-06-16 Thread Dan Carpenter
cx25821_i2c_algo_template is a i2c_algorithm struct. They are different sizes and the function pointers don't line up at all. I don't see how this can work at all. 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

Re: V4L/DVB (12730): Add conexant cx25821 driver

2012-06-16 Thread Dan Carpenter
x23885/cx23885-i2c.c:321 cx23885_i2c_register() error: memcpy() '&cx23885_i2c_algo_template' too small (24 vs 64) drivers/media/video/cx231xx/cx231xx-i2c.c:503 cx231xx_i2c_register() error: memcpy() '&cx231xx_algo' too small (24 vs 64) regards, dan carpenter -- To unsubscribe fr

Re: [PATCH 0/12] struct i2c_algo_bit_data cleanup on several drivers

2012-06-18 Thread Dan Carpenter
On Mon, Jun 18, 2012 at 04:23:14PM -0300, Ezequiel Garcia wrote: > Hi Mauro, > > This patchset cleans the i2c part of some drivers. > This issue was recently reported by Dan Carpenter [1], > and revealed wrong (and harmless) usage of struct i2c_algo_bit. > How is this harmles

Re: [PATCH 0/12] struct i2c_algo_bit_data cleanup on several drivers

2012-06-18 Thread Dan Carpenter
On Mon, Jun 18, 2012 at 06:00:52PM -0300, Ezequiel Garcia wrote: > On Mon, Jun 18, 2012 at 5:56 PM, Dan Carpenter > wrote: > > On Mon, Jun 18, 2012 at 04:23:14PM -0300, Ezequiel Garcia wrote: > >> Hi Mauro, > >> > >> This patchset cleans the i2c part of som

[patch] [media] drxk: fix a '&' vs '|' bug

2012-06-26 Thread Dan Carpenter
IQM_AF_CLKNEG_CLKNEGDATA__M is 0x2 and IQM_AF_CLKNEG_CLKNEGDATA_CLK_ADC_DATA_POS is 0. (clkNeg | 0x2) is never equal to zero so the condition can never be true. I consulted with Ralph Metzler and the '|' should be changed to a '&'. Signed-off-by: Dan Carpenter CC: Ralp

[patch -resend] [media] az6007: precedence bug in az6007_i2c_xfer()

2012-06-27 Thread Dan Carpenter
The intent here was to test that the flag was clear but the '!' has higher precedence than the '&'. I2C_M_RD is 0x1 so the current code is equivalent to "&& (!sgs[i].flags) ..." Signed-off-by: Dan Carpenter --- I sent this originally on Wed, 25 Jan 20

Re: [patch -resend] [media] az6007: precedence bug in az6007_i2c_xfer()

2012-06-28 Thread Dan Carpenter
On Wed, Jun 27, 2012 at 10:11:00AM -0300, Mauro Carvalho Chehab wrote: > Em 27-06-2012 06:06, Dan Carpenter escreveu: > > The intent here was to test that the flag was clear but the '!' has > > higher precedence than the '&'. I2C_M_RD is 0x1 so the curren

[media] tvp5150: signedness bug in tvp5150_selmux()

2012-07-12 Thread Dan Carpenter
tvp5150_read() returns negative error codes so this needs to be an int for the error handling to work. Signed-off-by: Dan Carpenter diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 0d897cb..a751b6c 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media

re: [media] drivers:media:radio: wl128x: FM Driver Common sources

2012-07-13 Thread Dan Carpenter
memcpy() and the overwrite part of the data on the next line? 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

Re: [media] drivers:media:radio: wl128x: FM Driver Common sources

2012-07-13 Thread Dan Carpenter
On Fri, Jul 13, 2012 at 01:17:11PM -0500, halli manjunatha wrote: > On Fri, Jul 13, 2012 at 6:51 AM, Dan Carpenter > wrote: > > > > Hello Manjunatha Halli, > > > > The patch e8454ff7b9a4: "[media] drivers:media:radio: wl128x: FM > > Driver Common

re: [media] gspca: Fix locking issues related to suspend/resume

2012-07-19 Thread Dan Carpenter
eft == 0) 190 packet_type = LAST_PACKET; 191 else 192 packet_type = INTER_PACKET; 193 gspca_frame_add(gspca_dev, packet_type, 194

[patch] [media] dib8000: move dereference after check for NULL

2012-07-20 Thread Dan Carpenter
My static checker complains that we dereference "state" inside the call to fft_to_mode() before checking for NULL. The comments say that it is possible for "state" to be NULL so I have moved the dereference after the check. Signed-off-by: Dan Carpenter diff --git a/drivers

[patch 1/2] [media] tuner-xc2028: fix "=" vs "==" typo

2012-07-21 Thread Dan Carpenter
We intended to do a compare here, not an assignment. Signed-off-by: Dan Carpenter --- Static analysis bug. I don't own the hardware. diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index f88f948..9e60285 100644 --- a/drivers/media/c

[patch 2/2] [media] tuner-xc2028: unlock on error in xc2028_get_afc()

2012-07-21 Thread Dan Carpenter
We need to do a mutex_unlock(&priv->lock) before returning. Signed-off-by: Dan Carpenter diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index 9e60285..ea0550e 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/driver

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

2011-10-17 Thread Dan Carpenter
ess than DMX_TS_PES_OTHER (20) in the caller function, but I changed it to less than or equal to DMX_TS_PES_PCR (4). Signed-off-by: Dan Carpenter 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 +++

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

2011-10-18 Thread Dan Carpenter
ter 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 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2011-10-18 Thread Dan Carpenter
e added to the Kernel > building system > 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

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

2011-10-29 Thread Dan Carpenter
> This shouldn't be an issue, I've also used patches saved directly form an > e-mail client > which didn't have this text appended and the patch didn't apply in same way. I get this error when I try apply them. patching file drivers/staging/media/as102/as10x_cmd.c pa

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

2011-11-07 Thread Dan Carpenter
2 so this doesn't work on 64 bit systems. regards, dan carpenter signature.asc Description: Digital signature

<    1   2   3   4   5   6   7   8   >