[patch] [media] exynos4-is: cleanup a define

2013-11-08 Thread Dan Carpenter
with Sylwester Nawrocki and the define should actually be (0xf << 28). Signed-off-by: Dan Carpenter diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c index 9fc2af6..31dfc50 100644 --- a/drivers/media/platform/exynos4-is/mipi-csis.c ++

re: [media] coda: update CODA7541 to firmware 1.4.50

2013-11-06 Thread Dan Carpenter
1532 ctx->internal_frames[i].size += ysize/4; 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: staging: media: Use dev_err() instead of pr_err()

2013-11-05 Thread Dan Carpenter
board = &board_matrix_ii; 1066 break; There are several other uses of "go" before it has been initialized. Probably you will just want to change these back to pr_info(). Some of the messages are not very useful like: dev_info(go->dev, "Sensoray 2250 found\n&

[patch -next] [media] cx231xx: use after free on error path in probe

2013-11-01 Thread Dan Carpenter
We dereference "dev" after it has already been freed. Signed-off-by: Dan Carpenter diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index e9d017b..528cce9 100644 --- a/drivers/media/usb/cx231xx/cx231xx-cards.c +++ b/drivers/media/u

re: [media] cx23885-dvb: use a better approach to hook set_frontend

2013-11-01 Thread Dan Carpenter
8 &mygica_x8506_xc5000_config); 1149 } 1150 cx23885_set_frontend_hook(port, fe0->dvb.frontend); ^ Dereference. 1151 break; regards, dan carpe

Re: [GIT PULL FOR v3.13] OMAP4 ISS driver

2013-10-15 Thread Dan Carpenter
> I don't take pull requests for staging drivers. > Yeah... Pull request get far less review. I never bother reviewing them, honestly. I feel bad for that. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of

Re: [PATCH 2/6] v4l: omap4iss: Add support for OMAP4 camera interface - Video devices

2013-10-04 Thread Dan Carpenter
ntity_pipeline_stop(&video->video.entity); err_media_entity_pipeline_start: if (video->iss->pdata->set_constraints) video->iss->pdata->set_constraints(video->iss, false); video->queue = NULL; mutex_unlock(&video->stream_lock); return ret; } 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] cx23885-dvb: use a better approach to hook set_frontend

2013-09-02 Thread Dan Carpenter
s dereference. 791 break; 792 case CX23885_BOARD_HAUPPAUGE_HVR1255: 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 v2] [media] mx3-camera: locking cleanup in mx3_videobuf_queue()

2013-08-29 Thread Dan Carpenter
t use spin_lock_irq(). It's called from __enqueue_in_driver(). Signed-off-by: Dan Carpenter --- v2: The first version changed everything to irq_save/restore() but that wasn't right because we wanted IRQs enabled and not simply restored. diff --git a/drivers/media/platform/soc_camera/

Re: [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface

2013-08-27 Thread Dan Carpenter
On Sun, Aug 25, 2013 at 02:23:18PM +0200, Sylwester Nawrocki wrote: > On 08/23/2013 11:46 AM, Dan Carpenter wrote: > >[ Going through some old warnings... ] > > > >Hello Sylwester Nawrocki, > > > >This is a semi-automatic email about new static checker warnin

Re: [patch] [media] mx3-camera: locking typo in mx3_videobuf_queue()

2013-08-24 Thread Dan Carpenter
On Fri, Aug 23, 2013 at 11:16:51PM +0200, Guennadi Liakhovetski wrote: > Hi Dan, > > On Fri, 23 Aug 2013, Dan Carpenter wrote: > > > There is a return in the middle where we haven't restored the IRQs to > > their original state. > > > > Signed-off

[patch] [media] sh_vou: almost forever loop in sh_vou_try_fmt_vid_out()

2013-08-23 Thread Dan Carpenter
The "i < " part of the "i < ARRAY_SIZE()" condition was missing. Signed-off-by: Dan Carpenter diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c index 7a9c5e9..41f612c 100644 --- a/drivers/media/platform/sh_vou.c +++ b/drivers/media/p

re: [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface

2013-08-23 Thread Dan Carpenter
e = (frame->f_width * frame->f_height * fmt->depth) / 8; ^^ Dereference. 461 } 462 463 if (fmt == NULL) ^^^ Check. 464 return -EINVAL; 4

[patch] [media] mx3-camera: locking typo in mx3_videobuf_queue()

2013-08-23 Thread Dan Carpenter
There is a return in the middle where we haven't restored the IRQs to their original state. Signed-off-by: Dan Carpenter diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c index 1047e3e..4bae910 100644 --- a/drivers/media/pla

[patch] [media] s3c-camif: forever loop in camif_hw_set_source_format()

2013-08-23 Thread Dan Carpenter
Because "i" is unsigned then "i-- >= 0" is always true. If we don't find what we are looking for then we loop forever. Signed-off-by: Dan Carpenter --- Why do we count backwards anyway? Counting upwards is easier. diff --git a/drivers/media/platform/s3c-camif/c

[patch] [media] exynos4-is: print error message on timeout

2013-08-23 Thread Dan Carpenter
There is a stray '!' character so the error message never gets printed. Signed-off-by: Dan Carpenter --- Static checker stuff. Not tested. diff --git a/drivers/media/platform/exynos4-is/fimc-is-regs.c b/drivers/media/platform/exynos4-is/fimc-is-regs.c index 63c68ec..42f2925 10

re: [media] s5p-csis: Add support for non-image data packets capture

2013-08-23 Thread Dan Carpenter
98 u32 offset; 699 700 if (status & S5PCSIS_INTSRC_EVEN) 701 offset = S5PCSIS_PKTDATA_EVEN; 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] i2c/ov9650: off by one in ov965x_enum_frame_sizes()

2013-08-23 Thread Dan Carpenter
The ">" should be ">=" otherwise we read one space beyond the end of the array. Signed-off-by: Dan Carpenter diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c index 1dbb811..4da90c6 100644 --- a/drivers/media/i2c/ov9650.c +++ b/drivers/media/i2c/o

[patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()

2013-08-23 Thread Dan Carpenter
The check is off by one so we could read one space past the end of the array. Signed-off-by: Dan Carpenter diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c index 789c02a..629a5cd 100644 --- a/drivers/media/i2c/s5k6aa.c +++ b/drivers/media/i2c/s5k6aa.c @@ -1003,7 +1003,7

[patch] [media] snd_tea575x: precedence bug in fmr2_tea575x_get_pins()

2013-08-22 Thread Dan Carpenter
The "|" operation has higher precedence that "?:" so this couldn't return both flags set at once as intended. Signed-off-by: Dan Carpenter --- Static checker stuff. Untested. diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c inde

Re: [PATCH] trivial: adjust code alignment

2013-08-05 Thread Dan Carpenter
cker warnings without fixing the bug then we are hiding real problems and making them more difficult to find. Just drop this chunk. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.o

Re: [patch] [media] bt8xx: info leak in ca_get_slot_info()

2013-07-25 Thread Dan Carpenter
On Thu, Jul 25, 2013 at 07:29:09PM +0200, walter harms wrote: > > > Am 25.07.2013 18:46, schrieb Dan Carpenter: > > p_ca_slot_info was allocated with kmalloc() so we need to clear it > > before passing it to the user. > > > > Signed-off-by: Dan Carpenter > &

[patch] [media] bt8xx: info leak in ca_get_slot_info()

2013-07-25 Thread Dan Carpenter
p_ca_slot_info was allocated with kmalloc() so we need to clear it before passing it to the user. Signed-off-by: Dan Carpenter diff --git a/drivers/media/pci/bt8xx/dst_ca.c b/drivers/media/pci/bt8xx/dst_ca.c index 0e788fc..6b9dc3f 100644 --- a/drivers/media/pci/bt8xx/dst_ca.c +++ b/drivers

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

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

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

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

2013-04-21 Thread Dan Carpenter
On Sun, Apr 21, 2013 at 01:51:56PM +0200, walter harms wrote: > > > Am 21.04.2013 13:10, schrieb Dan Carpenter: > > The last part of the "u_ent.name" buffer isn't cleared so it still has > > uninitialized stack memory. > > > > Signed-off-by: Da

[patch] [media] media: info leak in media_device_enum_entities()

2013-04-21 Thread Dan Carpenter
The last part of the "u_ent.name" buffer isn't cleared so it still has uninitialized stack memory. Signed-off-by: Dan Carpenter diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 99b80b6..1957c0d 100644 --- a/drivers/media/media-device.c +++ b/driv

[patch 2/2] [media] r820t: memory leak in release()

2013-04-18 Thread Dan Carpenter
I've moved the kfree(fe->tuner_priv) one line earlier, otherwise it is a no-op. Signed-off-by: Dan Carpenter --- This is a static checker fix and I have not tested it. diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index ba033fd..36ddbf1 100644 --- a/drive

[patch 1/2] [media] r820t: precendence bug in r820t_xtal_check()

2013-04-18 Thread Dan Carpenter
The test as written is always false. It looks like the intent was to test that the bit was not set. Signed-off-by: Dan Carpenter diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index 905a106..ba033fd 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners

Re: [PATCH 12/12] radio-si476x: Fix incorrect pointer checking

2013-04-18 Thread Dan Carpenter
ch would not > be checked. > > * Remove code duplication in "si476x_radio_read_rsq_blob" and > "si476x_radio_read_rsq_primary_blob". > > * Add some BUG_ON statements for function pointers that should never be NULL > > Signed-off-by: Andrey Smirnov > Si

Re: [RFC] [media] dvb-core: check ->msg_len for diseqc_send_master_cmd()

2013-04-17 Thread Dan Carpenter
Any feedback on this? I forgot to CC Steven Toth last time because he would know about the cx24116 driver. I've looked at it again and it still looks like cx24116_send_diseqc_msg() is copying garbage into the state->dsec_cmd.args[] array. regards, dan carpenter On Tue, Apr 02, 2013

[patch] [media] go7007: dubious one-bit signed bitfields

2013-04-17 Thread Dan Carpenter
007/go7007-priv.h:95:31: error: dubious one-bit signed bitfield Signed-off-by: Dan Carpenter diff --git a/drivers/staging/media/go7007/go7007-priv.h b/drivers/staging/media/go7007/go7007-priv.h index 8bde187..6e16af7 100644 --- a/drivers/staging/media/go7007/go7007-priv.h +++ b/drivers/stag

[patch] [media] dvb-frontends: lg2160: dubious one-bit signed bitfield

2013-04-17 Thread Dan Carpenter
Sparse complains that these are "dubious one-bit signed bitfields" and the comment says it was intended to be 1 and 0 instead of -1 and 0. Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb-frontends/lg2160.h b/drivers/media/dvb-frontends/lg2160.h index a5f0368..194a07a 10

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

2013-04-13 Thread Dan Carpenter
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 diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 99b80b6..450c0d1 100644 --- a/driv

[patch] [media] radio-si476x: check different function pointers

2013-04-10 Thread Dan Carpenter
n-NULL. The one place where that's not true is when we check ->rds_blckcnt instead of ->rsq_status. In those cases, we would want to call ->rsq_status but we instead return -ENOENT. Signed-off-by: Dan Carpenter --- Please review this carefully. I don't have the hardware

re: [media] redrat3: remove memcpys and fix unaligned memory access

2013-04-09 Thread Dan Carpenter
^^ Should we be copying "pktlen" bytes on the line before? It seems inconsistent that it doesn't match the debug code. My main concern is that we limit the size of "pktlen" but then we only use it for debug output. 642 break; regards, dan carpenter

Re: [patch] [media] dt3155v4l: unlock on error path

2013-04-08 Thread Dan Carpenter
On Tue, Apr 09, 2013 at 07:20:19AM +0200, Julia Lawall wrote: > On Tue, 9 Apr 2013, Dan Carpenter wrote: > > > We should unlock here and do some cleanup before returning. > > > > We can't actually hit this return path with the current code, so this > > patch i

[patch] [media] dt3155v4l: unlock on error path

2013-04-08 Thread Dan Carpenter
We should unlock here and do some cleanup before returning. We can't actually hit this return path with the current code, so this patch is a basically a cleanup and doesn't change how the code works. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/media/dt3155v4l/dt31

[RFC] [media] dvb-core: check ->msg_len for diseqc_send_master_cmd()

2013-04-02 Thread Dan Carpenter
nd_diseqc_msg() ds3000_send_diseqc_msg() etc. Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 57601c0..3d1eee6 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_

Re: [PATCH -next] [media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()

2013-03-26 Thread Dan Carpenter
On Tue, Mar 26, 2013 at 10:04:15AM +0300, Dan Carpenter wrote: > On Tue, Mar 26, 2013 at 02:42:47PM +0800, Wei Yongjun wrote: > > From: Wei Yongjun > > > > sizeof() when applied to a pointer typed expression gives the > > size of the pointer, not that of the pointed da

Re: [PATCH -next] [media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()

2013-03-26 Thread Dan Carpenter
#x27;t know what this code is doing. Instead of sizeof(*buf) it should be something like "buflen", "msg[i].len", "msg[i].len + 1" or "msg[i].len + 3". I'm not sure which is correct here or what it's doing, sorry. regards, dan carpenter -- To unsubscrib

Re: [PATCH] MAINTAINERS: Remove Jarod Wilson and orphan LIRC drivers

2013-02-12 Thread Dan Carpenter
On Tue, Feb 12, 2013 at 01:20:36PM -0800, Joe Perches wrote: > His email bounces and he hasn't done work on > these sections in a couple of years. > I've added him to the CC list. Can we just update MAINTAINERS with the correct email address? It's been useful to CC him

[patch] [media] mceusb: move check earlier to make smatch happy

2013-02-12 Thread Dan Carpenter
Smatch complains that "cmdbuf[cmdcount - length]" might go past the end of the array. It's an easy warning to silence by moving the limit check earlier. Signed-off-by: Dan Carpenter diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index bdd1ed8..5b5b6e6 10064

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

2013-02-07 Thread Dan Carpenter
return res | POLLIN | POLLRDNORM; 1466 return res; 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 v2] dvb-usb: check for invalid length in ttusb_process_muxpack()

2013-02-07 Thread Dan Carpenter
lso invalid and would lead to reading past the end of the array. Signed-off-by: Dan Carpenter --- v2: Moved the check from the caller into the function. Added a check for odd values. Added an error message. Increment the numinvalid counter. diff --git a/drivers/media/usb/ttusb-budget/dvb-ttusb-budge

re: V4L/DVB (8986): cx24116: Adding DVB-S2 demodulator support

2013-02-05 Thread Dan Carpenter
past the end of the smaller array. d->msg_len comes from the user. I don't know if this can result in an information leak? It's weird that we're copying bogus data into the state->dsec_cmd.args[] array. regards, dan carpenter -- To unsubscribe from this list: send the lin

[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 diff --git a/drivers/media/usb/tm6000/tm6000-core.c b/drivers/media/usb/tm6000/tm6000-c

[media] staging: go7007: fix test for V4L2_STD_SECAM

2013-01-28 Thread Dan Carpenter
are next to each other on the keyboard. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/media/go7007/wis-saa7113.c b/drivers/staging/media/go7007/wis-saa7113.c index 8810c1e..891cde7 100644 --- a/drivers/staging/media/go7007/wis-saa7113.c +++ b/drivers/staging/media/go7007/wis-s

Re: [PATCH 3/4] staging: media: go7007: i2c GPIO initialization Reset i2c stuff for GO7007_BOARDID_ADLINK_MPG24 need reset GPIO always when encoder initialize

2013-01-16 Thread Dan Carpenter
On Wed, Jan 16, 2013 at 06:00:13PM +0400, Volokh Konstantin wrote: > On Wed, Jan 16, 2013 at 04:36:08PM +0300, Dan Carpenter wrote: > > You've added the writes for GO7007_BOARDID_ADLINK_MPG24 but removed > > them for GO7007_BOARDID_XMEN and GO7007_BOARDID_XMEN_III. Won&#x

Re: [PATCH 3/4] staging: media: go7007: i2c GPIO initialization Reset i2c stuff for GO7007_BOARDID_ADLINK_MPG24 need reset GPIO always when encoder initialize

2013-01-16 Thread Dan Carpenter
You've added the writes for GO7007_BOARDID_ADLINK_MPG24 but removed them for GO7007_BOARDID_XMEN and GO7007_BOARDID_XMEN_III. Won't that break those boards? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of

Re: [PATCH 2/4] staging: media: go7007: firmware protection Protection for unfirmware load

2013-01-16 Thread Dan Carpenter
The problem is that the firmware was being unloaded on disconnect? 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/4] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev allocation

2013-01-16 Thread Dan Carpenter
On Wed, Jan 16, 2013 at 05:00:48PM +0400, Volokh Konstantin wrote: > Signed-off-by: Volokh Konstantin Acked-by: 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

[media] tuners/xc5000: fix MODE_AIR in xc5000_set_params()

2013-01-13 Thread Dan Carpenter
There is a missing break so we use XC_RF_MODE_CABLE instead of XC_RF_MODE_AIR. Signed-off-by: Dan Carpenter --- Static checker stuff. Untested. diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c index dc93cf3..d6be1b6 100644 --- a/drivers/media/tuners/xc5000.c +++ b

[patch] [media] cx231xx: add a missing break statement

2013-01-10 Thread Dan Carpenter
My static checker complains about the fall through here. From the context it looks like we should add a break statement. Signed-off-by: Dan Carpenter --- Untested. diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 93dfc18..06376d9 100644

[patch] [media] staging: go7007: print the audio input type

2013-01-10 Thread Dan Carpenter
Smatch complains that the "Audio input:" printk isn't reachable. Hiding the "return 0;" behind another statement is a style violation. It looks like audio_input is normally configured so I've enabled the print statement. Signed-off-by: Dan Carpenter diff --git

[media] dvb-usb: reading before start of array

2013-01-08 Thread Dan Carpenter
This is a static checker fix. In the ttusb_process_muxpack() we do: cc = (muxpack[len - 4] << 8) | muxpack[len - 3]; That means if we pass a number less than 4 then we will either trigger a checksum error message or read before the start of the array. Signed-off-by: Dan Car

[patch] [media] dvb: unlock on error in dvb_ca_en50221_io_do_ioctl()

2013-01-04 Thread Dan Carpenter
We recently pushed the locking down into this function, but there was an error path where the unlock was missed. Signed-off-by: Dan Carpenter --- Only needed in linux-next. diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c index 190e5e0..0aac309

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Dan Carpenter
thread. *shrug*. 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 RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Dan Carpenter
ereference it. NULL returns don't imply an error so don't use IS_ERR_OR_NULL() to check for errors." 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 RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Dan Carpenter
On Wed, Jan 02, 2013 at 06:31:53PM +1300, Tony Prisk wrote: > On Wed, 2013-01-02 at 08:10 +0300, Dan Carpenter wrote: > > clk_get() returns NULL if CONFIG_HAVE_CLK is disabled. > > > > I told Tony about this but everyone has been gone with end of year > > holidays

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-01 Thread Dan Carpenter
to revert patches. 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] 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 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

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

[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

[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

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

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

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

[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

[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

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

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

[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

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

[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

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

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

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

[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: [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); > > > >

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

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

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

<    1   2   3   4   5   6   7   8   >