potential null deref in mpeg_open()

2009-07-19 Thread Dan Carpenter
(level, fmt, arg...)\ 60 do { if (v4l_debug = level) \ 61 printk(KERN_DEBUG %s: fmt, dev-name , ## arg);\ 62 } while (0) regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

double unlock in bttv_poll() and in saa7134-video.c

2009-07-25 Thread Dan Carpenter
rc = 0; 3200 err: 3201 mutex_unlock(fh-cap.vb_lock); I looked at the code but I wasn't sure what the correct way to fix it is. video_poll() from drivers/media/video/saa7134/saa7134-video.c has the same issue. regards, dan carpenter -- To unsubscribe from this list

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

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

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

2013-02-05 Thread Dan Carpenter
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 line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info

[patch v2] dvb-usb: check for invalid length in ttusb_process_muxpack()

2013-02-07 Thread Dan Carpenter
and would lead to reading past the end of the array. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- 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

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

2013-02-07 Thread Dan Carpenter
statement then buf is uninitialized. 1462 poll_wait(file, buf-vb.done, wait); 1463 if (buf-vb.state == VIDEOBUF_DONE || 1464 buf-vb.state == VIDEOBUF_ERROR) 1465 return res | POLLIN | POLLRDNORM; 1466 return res; regards, dan

[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 dan.carpen...@oracle.com diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index bdd1ed8..5b5b6e6

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 on stuff. regards, dan

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

2013-03-26 Thread Dan Carpenter
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 unsubscribe from this list: send the line unsubscribe linux-media in the body

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 yongjun_...@trendmicro.com.cn sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data

[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 dan.carpen...@oracle.com --- v2: Ben Hutchings pointed out that my first patch was not a complete fix. diff

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

2012-09-10 Thread Dan Carpenter
; if (input == 0) reg = ~(1 2); else reg |= 1 2; reg = write_reg(client, 0x22, reg, dec-channel); if (reg 0) return reg; dec-input = input; return 0; regards, dan carpenter + + if (reg = 0

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

2012-09-11 Thread Dan Carpenter
is passed to mod_freq_to_val() which uses it as a divisor. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- 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/ene_ir.c b

[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 s...@mess.org 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 6ad4a07..c0dc1b9 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b

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

2012-09-12 Thread Dan Carpenter
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
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-24 Thread Dan Carpenter
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 all with similar

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

2012-09-26 Thread Dan Carpenter
*array_size = edid-blocks * 128; ^^ This can overflow. 2208 ret = 1; 2209 } 2210 break; 2211 } regards, dan carpenter -- To unsubscribe from this list: send

[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 dan.carpen...@oracle.com --- 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

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 dan.carpen...@oracle.com --- I'm not totally convinced that using /root

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

2012-10-02 Thread Dan Carpenter
if_frequency -= adc_freq; 466 467 if (if_frequency = 0) ^ This is always true. 468 spec_inv *= -1; 469 else 470 if_frequency *= -1; regards, dan

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

2012-10-10 Thread Dan Carpenter
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, dan carpenter -- To unsubscribe

[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 dan.carpen...@oracle.com 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

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 convert it to devm_*? If you

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 dan.carpen...@oracle.com 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 'minor

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 dan.carpen...@oracle.com We have reorganized the error handling into a simpler

[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 dan.carpen...@oracle.com 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

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 dan.carpen...@oracle.com diff --git a/drivers

Re: [PATCH] trivial: adjust code alignment

2013-08-05 Thread Dan Carpenter
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.org More majordomo info at http://vger.kernel.org

[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 dan.carpen...@oracle.com --- Static checker stuff. Untested. diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index

[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 dan.carpen...@oracle.com 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

[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 dan.carpen...@oracle.com 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/ov9650.c

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

2013-08-23 Thread Dan Carpenter
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] 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 dan.carpen...@oracle.com --- 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

[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 dan.carpen...@oracle.com --- Why do we count backwards anyway? Counting upwards is easier. diff --git a/drivers/media/platform/s3c-camif/camif-regs.c

[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 dan.carpen...@oracle.com diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c index 1047e3e..4bae910 100644

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

2013-08-23 Thread Dan Carpenter
; ^^ Dereference. 461 } 462 463 if (fmt == NULL) ^^^ Check. 464 return -EINVAL; 465 *num_planes = 1; regards, dan carpenter

[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 dan.carpen...@oracle.com 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/platform

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 warnings. The patch babde1c243b2: [media] V4L: Add

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

2013-08-29 Thread Dan Carpenter
spin_lock_irq(). It's called from __enqueue_in_driver(). Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- 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

[patch] [media] staging: sn9c102: add a USB depend to the Kconfig

2014-01-02 Thread Dan Carpenter
This driver won't link without USB support. Reported-by: Jim Davis jim.ep...@gmail.com Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/staging/media/sn9c102/Kconfig b/drivers/staging/media/sn9c102/Kconfig index d8ae2354b626..3ab9c81173da 100644 --- a/drivers/staging

Re: [kbuild-all] [linuxtv-media:master 499/499] drivers/media/i2c/s5k5baf.c:362:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t'

2014-01-08 Thread Dan Carpenter
by the firmware? 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] Add driver for Samsung S5K5BAF camera sensor

2014-01-08 Thread Dan Carpenter
if (fw == NULL) ^^ Check. 555 return NULL; 556 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: [media] Add driver for Samsung S5K5BAF camera sensor

2014-01-08 Thread Dan Carpenter
) ^^^ This would be cleaner if it were if (on == state-power) 1044 goto out; 1045 1046 if (on) { 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

Re: [media] Add driver for Samsung S5K5BAF camera sensor

2014-01-08 Thread Dan Carpenter
On Wed, Jan 08, 2014 at 12:58:35PM +0100, Andrzej Hajda wrote: On 01/08/2014 10:58 AM, Dan Carpenter wrote: Hello Andrzej Hajda, The patch 7d459937dc09: [media] Add driver for Samsung S5K5BAF camera sensor from Dec 5, 2013, leads to the following static checker warning

[linuxtv-media:master 499/499] drivers/media/rc/rc-main.c:1201 rc_register_device() warn: inconsistent returns mutex:dev-lock: locked (1107 [(-12)]) unlocked (1077 [(-22)], 1083 [(-22)], 1186 [0], 1

2014-01-15 Thread Dan Carpenter
Hi Mauro, FYI, there are new smatch warnings show up in tree: git://linuxtv.org/media_tree.git master head: 587d1b06e07b4a079453c74ba9edf17d21931049 commit: 587d1b06e07b4a079453c74ba9edf17d21931049 [499/499] [media] rc-core: reuse device numbers drivers/media/rc/rc-main.c:1201

[patch] [media] tda10071: remove a duplicative test

2014-01-30 Thread Dan Carpenter
ret is an error code here, we already tested that. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c index 8ad3a57cf640..a76df29c4973 100644 --- a/drivers/media/dvb-frontends/tda10071.c +++ b

re: [media] gspca - topro: New subdriver for Topro webcams

2014-01-30 Thread Dan Carpenter
break; 4681 } 4682 } 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] dvb-frontends: decimal vs hex typo in ChannelConfiguration()

2014-02-05 Thread Dan Carpenter
From the context this should be hex 0x80 instead of decimal 80. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Untested. diff --git a/drivers/media/dvb-frontends/tda18271c2dd.c b/drivers/media/dvb-frontends/tda18271c2dd.c index 2c54586ac07f..de0a1c110972 100644 --- a/drivers/media

[patch] [media] stv0900: remove an unneeded check

2014-02-06 Thread Dan Carpenter
No need to check lock twice here. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb-frontends/stv0900_sw.c b/drivers/media/dvb-frontends/stv0900_sw.c index 0a40edfad739..4ce1d260b3eb 100644 --- a/drivers/media/dvb-frontends/stv0900_sw.c +++ b/drivers/media/dvb

[patch] [media] stv090x: remove indent levels

2014-02-06 Thread Dan Carpenter
1) We can flip the if (!lock) check to if (lock) return lock; and then remove a big chunk of indenting. 2) There is a redundant if (!lock) which we can remove since we already know that lock is zero. This removes another indent level. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

[patch] [media] em28xx-cards: don't print a misleading message

2014-02-17 Thread Dan Carpenter
There were some missing curly braces so it always says that the transfer mode changed even if it didn't. Also the indenting uses spaces instead of tabs. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx

Re: [patch] [media] stv090x: remove indent levels

2014-02-18 Thread Dan Carpenter
On Tue, Feb 18, 2014 at 09:25:36AM +0530, Manu Abraham wrote: Hi Dan, On Thu, Feb 6, 2014 at 2:58 PM, Dan Carpenter dan.carpen...@oracle.com wrote: 1) We can flip the if (!lock) check to if (lock) return lock; and then remove a big chunk of indenting. 2) There is a redundant

[patch] [media] gspca_stv06xx: remove an unneeded check

2014-02-18 Thread Dan Carpenter
err is zero here so we don't need to check again. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c b/drivers/media/usb/gspca/stv06xx/stv06xx_vv6410.c index bf3e5c317a26..e60cbb3aa609 100644 --- a/drivers/media/usb/gspca/stv06xx

Re: [patch] [media] stv090x: remove indent levels

2014-02-18 Thread Dan Carpenter
On Wed, Feb 19, 2014 at 10:52:32AM +0530, Manu Abraham wrote: On Tue, Feb 18, 2014 at 2:26 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Tue, Feb 18, 2014 at 09:25:36AM +0530, Manu Abraham wrote: Hi Dan, On Thu, Feb 6, 2014 at 2:58 PM, Dan Carpenter dan.carpen...@oracle.com

Re: [patch] [media] stv090x: remove indent levels

2014-02-20 Thread Dan Carpenter
Guys, what Manu is saying is purest nonsense. The lock variable is a stack variable, it's not a demodulator Read-modify-Write register. The implications of changing if (!lock) to if (lock) are simple and obvious. He's not reviewing patches, he's just NAKing them. It's not helpful. regards, dan

Re: [patch] [media] stv090x: remove indent levels

2014-02-20 Thread Dan Carpenter
On Thu, Feb 20, 2014 at 11:24:21AM +0100, Hans Verkuil wrote: Hi Dan, This can be improved even more: Sure. Thanks. I will send v2 tomorrow. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

[patch v2] [media] stv090x: remove indent levels in stv090x_get_coldlock()

2014-02-21 Thread Dan Carpenter
reviewed this code for some time to see if something else was intended, but have concluded that it was simply an oversight and should be removed. Removing this duplicative check gains us an third indent level. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: add the returns

Re: [patch] [media] em28xx-cards: don't print a misleading message

2014-02-24 Thread Dan Carpenter
Thank you so much for the review. I should have noticed that myself... I will send a patch to correct the indenting instead. 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] av7110_hw: fix a sanity check in av7110_fw_cmd()

2014-03-01 Thread Dan Carpenter
ARRAY_SIZE(buf) (8 elements) was intended instead of sizeof(buf) (16 bytes). But this is just a sanity check and the callers always pass valid values so this doesn't cause a problem. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/pci/ttpci/av7110_hw.c b

[patch] [media] ddbridge: remove unneeded an NULL check

2014-03-01 Thread Dan Carpenter
intput-fe can't be NULL because if demod_attach_drxk() fails to allocate it, then we would have return an error code. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c index 9375f30d9a81

[linuxtv-media:master 463/499] drivers/media/dvb-frontends/drx39xyj/drxj.c:20803 drx_ctrl_u_code() warn: variable dereferenced before check 'mc_info' (see line 20800)

2014-03-05 Thread Dan Carpenter
Hi Mauro, FYI, there are new smatch warnings show up in tree: git://linuxtv.org/media_tree.git master head: 59432be1c7fbf2a4f608850855ff649bee0f7b3b commit: b240eacdd536bac23c9d48dfc3d527ed6870ddad [463/499] [media] drx-j: get rid of drx_driver.c New smatch warnings:

[linuxtv-media:master 467/499] drivers/media/dvb-frontends/drx39xyj/drxj.c:20041 drxj_close() warn: variable dereferenced before check 'demod' (see line 20036)

2014-03-05 Thread Dan Carpenter
Hi Mauro, FYI, there are new smatch warnings show up in tree: git://linuxtv.org/media_tree.git master head: 59432be1c7fbf2a4f608850855ff649bee0f7b3b commit: b78359a6894ac3451bec3fde5d0499fba87b8b67 [467/499] [media] drx-j: get rid of the remaining drx generic functions New smatch warnings:

[patch v2] [patch] [media] em28xx-cards: remove a wrong indent level

2014-03-05 Thread Dan Carpenter
This code is correct but the indenting is wrong and triggers a static checker warning add curly braces?. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: in v1 I added curly braces. diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index

Re: [patch v2] [patch] [media] em28xx-cards: remove a wrong indent level

2014-03-07 Thread Dan Carpenter
On Fri, Mar 07, 2014 at 05:46:28PM +0100, Frank Schäfer wrote: Am 05.03.2014 12:09, schrieb Dan Carpenter: This code is correct but the indenting is wrong and triggers a static checker warning add curly braces?. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: in v1 I

[patch] [media] av7110: fix confusing indenting

2014-03-28 Thread Dan Carpenter
The else statement here is not aligned with the correct if statement. I think the code works as intended and it's just the indenting which is wrong. Also kernel style says we should use curly braces here so I have added those. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- This patch

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

2014-04-01 Thread Dan Carpenter
. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com Reviewed-by: Antti Palosaari cr...@iki.fi --- This is a static checker fix and I haven't tested it but the security implications are quite bad so we should fix this. diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core

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

2014-04-01 Thread Dan Carpenter
Oops. I send this to Mauro's old email address. Sorry about that. regards, dan carpenter On Tue, Apr 01, 2014 at 05:38:07PM +0300, Dan Carpenter wrote: I'd like to send this patch except that it breaks cx24116_send_diseqc_msg(). The cx24116 driver accepts -msg_len values up to 24

Re: [PATCH] staging: lirc: fix NULL pointer dereference

2014-04-02 Thread Dan Carpenter
, +__func__); It should be pr_err() or something. But actually ir can't be NULL so just delete the whole condition. return -EINVAL; } regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message

Re: [PATCH] staging: lirc: remove redundant NULL check in unregister_from_lirc()

2014-04-02 Thread Dan Carpenter
On Wed, Apr 02, 2014 at 02:49:03AM -0700, Daeseok Youn wrote: ir is already checked before calling unregister_from_lirc(). Reviewed-by: Dan Carpenter dan.carpen...@oracle.com regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body

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

2014-04-04 Thread Dan Carpenter
Whatever happened with this btw? Also are you sure we don't need a second check after line 457? regards, dan carpenter On Tue, Aug 27, 2013 at 04:26:07PM +0200, Sylwester Nawrocki wrote: On 08/27/2013 04:19 PM, Dan Carpenter wrote: On Sun, Aug 25, 2013 at 02:23:18PM +0200, Sylwester Nawrocki

Re: [PATCH 2/2] staging: media: omap24xx: fix up a checkpatch.pl warning

2014-04-10 Thread Dan Carpenter
The two subjects are really close to being the same. You should choose better subjects. Like: [PATCH 2/2] staging: media: omap24xx: use pr_info() instead of KERN_INFO (All the checkpatch.pl people use the exact same subject for everything though, so you're not alone in this). regards, dan

Re: [PATCH 2/2] staging: media: omap24xx: fix up a checkpatch.pl warning

2014-04-10 Thread Dan Carpenter
a patch for a single style issue in the staging tree. All newbies... Hoping to be back with more substantial contributions soon. Yeah, I know about eudyptula. No worries. Newbies are welcome in staging. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux

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

2014-04-11 Thread Dan Carpenter
What ever happened with this? regards, dan carpenter On Wed, Nov 06, 2013 at 07:13:43PM +0300, Dan Carpenter wrote: Hello Philipp Zabel, This is a semi-automatic email about new static checker warnings. The patch 5677e3b04d3b: [media] coda: update CODA7541 to firmware 1.4.50 from Jun 21

[PATCH v2] radio-bcm2048.c: fix wrong overflow check

2014-04-22 Thread Dan Carpenter
From: Pali Rohár pali.ro...@gmail.com This patch fixes an off by one check in bcm2048_set_region(). Reported-by: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Pali Rohár pali.ro...@gmail.com Signed-off-by: Pavel Machek pa...@ucw.cz Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

Re: [PATCH] radio-bcm2048.c: fix wrong overflow check

2014-04-22 Thread Dan Carpenter
On Tue, Apr 22, 2014 at 11:38:36AM +0200, Pavel Machek wrote: Feel free to resubmit the patch yourself. No problem. Happy to help. 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

[PATCH v3] [media] radio-bcm2048: fix wrong overflow check

2014-04-22 Thread Dan Carpenter
From: Pali Rohár pali.ro...@gmail.com This patch fixes an off by one check in bcm2048_set_region(). Reported-by: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Pali Rohár pali.ro...@gmail.com Signed-off-by: Pavel Machek pa...@ucw.cz Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

[patch v3] [media] em28xx-cards: fix indenting in probe()

2014-04-30 Thread Dan Carpenter
There was a mix of 4 space and tab indenting here which was confusing. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v3: Just fix all the surrounding indents as well. v2: At first I thought the code was buggy and was missing curly braces but it was just the indenting which

[linuxtv-samsung:for-v3.16 45/81] drivers/media/dvb-frontends/si2168.c:47 si2168_cmd_execute() warn: add some parenthesis here?

2014-05-05 Thread Dan Carpenter
tree: git://linuxtv.org/snawrocki/samsung.git for-v3.16 head: 13b46c7a03adbcc347b77a13ed27066bc92d515c commit: 192292403147877c7d5f737a3cc751ded397aef7 [45/81] [media] em28xx: add [2013:025f] PCTV tripleStick (292e) drivers/media/dvb-frontends/si2168.c:47 si2168_cmd_execute() warn: add some

Re: [PATCH] staging: lirc: Fix sparse warnings

2014-05-08 Thread Dan Carpenter
this at the start of the function. u32 __user *uptr = (u32 __user *)arg; Then replace all the arg references with uptr. Btw, the difference between __u32 and u32 is that __u32 is for code which is shared with user space and u32 is only allowed in kernel code. regards, dan carpenter

Re: [PATCH] staging: lirc: Fix sparse warnings

2014-05-08 Thread Dan Carpenter
On Thu, May 08, 2014 at 01:30:28PM +0300, Dan Carpenter wrote: On Thu, May 08, 2014 at 01:11:48PM +0300, Tuomas Tynkkynen wrote: Fix sparse warnings by adding __user and __iomem annotations where necessary and removing certain unnecessary casts. Signed-off-by: Tuomas Tynkkynen

Re: [PATCH v2] staging: lirc: Fix sparse warnings

2014-05-08 Thread Dan Carpenter
. Reviewed-by: Dan Carpenter dan.carpen...@oracle.com Btw, don't resend this (someone will have to fix it in a later patch) but I notice that these IOCTLs are not implemented consistently. Even outside of staging we have this problem. For example lirc_rx51_ioctl(). In this function the user gets

re: [media] exynos4-is: Add the FIMC-IS ISP capture DMA driver

2014-05-08 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] Staging: dt3155v4l: set error code on failure

2014-05-09 Thread Dan Carpenter
We should be returning -ENOMEM here instead of success. 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 afbc2e5..178aa5b 100644 --- a/drivers/staging/media/dt3155v4l/dt3155v4l.c

Re: [PATCHv2] staging: media: as102: replace custom dprintk() with dev_dbg()

2014-05-17 Thread Dan Carpenter
in real life. 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: [linuxtv-samsung:for-v3.16 45/81] drivers/media/dvb-frontends/si2168.c:47 si2168_cmd_execute() warn: add some parenthesis here?

2014-05-20 Thread Dan Carpenter
will hang whole machine when em28xx driver used (em28xx driver is USB bridge for those si2168 and si2157). Wait, what? This is a one liner. I haven't understood the connection with 3.15-rc1? regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body

Re: [PATCH] Staging: Media: sn9c102: Fixed a pointer declaration coding style issue

2014-05-23 Thread Dan Carpenter
apply. Read this: https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/email-clients.txt 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

Re: [PATCH] staging/media/rtl2832u_sdr: fix coding style problems

2014-06-02 Thread Dan Carpenter
...@phas.ubc.ca Send the patch inline, not as an attachment. Read the first paragraph. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/email-clients.txt The subject should say something about adding blank lines. regards, dan carpenter -- To unsubscribe from

Re: [PATCH] staging/media/rtl2832u_sdr: fix coding style problems by adding blank lines

2014-06-02 Thread Dan Carpenter
On Mon, Jun 02, 2014 at 12:50:35PM -0700, Ovidiu Toader wrote: On 06/02/14 03:21, Dan Carpenter wrote: Send the patch inline, not as an attachment. Read the first paragraph. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/email-clients.txt

Re: [PATCH v2] staging/media/rtl2832u_sdr: fix coding style problems by adding blank lines

2014-06-03 Thread Dan Carpenter
On Mon, Jun 02, 2014 at 05:38:06PM -0700, Ovidiu Toader wrote: This minor patch fixes all WARNING:SPACING style warnings in rtl2832_sdr.c The new version of the file pleases checkpatch.pl when run with --ignore LONG_LINE. Looks good. Thanks. regards, dan carpenter -- To unsubscribe

[patch] [media] davinci: vpfe: dm365: remove duplicate RSZ_LPF_INT_MASK

2014-06-09 Thread Dan Carpenter
The RSZ_LPF_INT_MASK define is cut and pasted twice so we can remove the second instance. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h index 010fdb2..81176fb 100644

[patch] [media] zoran: remove duplicate ZR050_MO_COMP define

2014-06-09 Thread Dan Carpenter
The ZR050_MO_COMP define is cut and pasted twice so we can delete the second instance. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/pci/zoran/zr36050.h b/drivers/media/pci/zoran/zr36050.h index 9f52f0c..ea083ad 100644 --- a/drivers/media/pci/zoran/zr36050.h

[patch] [media] cx18: remove duplicate CX18_ALSA_DBGFLG_WARN define

2014-06-09 Thread Dan Carpenter
The CX18_ALSA_DBGFLG_WARN is cut and pasted twice and we can delete the second instance. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/pci/cx18/cx18-alsa.h b/drivers/media/pci/cx18/cx18-alsa.h index 447da37..2718be2 100644 --- a/drivers/media/pci/cx18/cx18

Re: [patch] [media] cx18: remove duplicate CX18_ALSA_DBGFLG_WARN define

2014-06-09 Thread Dan Carpenter
Btw, the ivtv-de...@ivtvdriver.org list appears to be subscribers-only even though it says moderated in the MAINTAINERS file. It's a waste of time to list it in MAINTAINERS at that point. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body

[patch] [media] davinci: vpif: missing unlocks on error

2014-06-11 Thread Dan Carpenter
We recently changed some locking around so we need some new unlocks on the error paths. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Please review this one carefully. I don't know if the unlock should go before or after the list_for_each_entry_safe() loop. diff --git a/drivers

[patch v2] [media] davinci: vpif: missing unlocks on error

2014-06-12 Thread Dan Carpenter
We recently changed some locking around so we need some new unlocks on the error paths. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: move the unlock so the list_for_each_entry_safe() loop is protected diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media

re: [media] dvb_usb_v2: use dev_* logging macros

2014-06-12 Thread Dan Carpenter
-generic_bulk_ctrl_endpoint_response) { 31 dev_dbg(d-udev-dev, %s: failed=%d\n, __func__, -EINVAL); ^ New dereference. 32 return -EINVAL; 33 } regards, dan carpenter -- To unsubscribe from this list: send the line

Re: [PATCH] [media] davinci-vpfe: Fix retcode check

2014-07-08 Thread Dan Carpenter
program and test. 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] solo6x10: expose encoder quantization setting as V4L2 control

2014-07-08 Thread Dan Carpenter
-off-by lines. 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: msi2500: move msi3101 out of staging and rename

2014-07-25 Thread Dan Carpenter
if (!msi2500_ctrl_msg(s, CMD_STOP_STREAMING, 0)) { ^^ Unchecked dereference if you have debugging enabled. 888 /* sleep USB IF / ADC */ 889 msi2500_ctrl_msg(s, CMD_WREG, 0x0103); 890 } regards, dan

<    1   2   3   4   5   6   7   >