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

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

2014-02-20 Thread Dan Carpenter
patches, he's just NAKing them. It's not helpful. 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] 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

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

2014-02-21 Thread Dan Carpenter
ot; is also a problem because it sets off a static checker warning. I have 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-b

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 majo

[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 diff --git a/drivers/media/pci/ttpci/av7110_hw.c b/drivers/media/pci/

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

2014-03-01 Thread Dan Carpenter
t;fe->tuner_priv; But actually "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 diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-cor

[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: drivers/media/dvb-front

[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 --- 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 4d

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

[patch v2][media] em28xx-i2c: rt_mutex_trylock() returns zero on failure

2016-05-09 Thread Dan Carpenter
The code is checking for negative returns but it should be checking for zero. Fixes: aab3125c43d8 ('[media] em28xx: add support for registering multiple i2c buses') Signed-off-by: Dan Carpenter --- Use different error code. diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/dri

[patch] media: s5p-mfc: fix a couple double frees in probe

2016-06-11 Thread Dan Carpenter
The extra calls to video_device_release() are a bug, we free these after the goto. Fixes: c974c436eaf4 ('s5p-mfc: Fix race between s5p_mfc_probe() and s5p_mfc_open()') Signed-off-by: Dan Carpenter --- This code would be easier to understand if it didn't use "come from"

[patch] [media] dvb-usb: silence an uninitialized variable warning

2016-06-27 Thread Dan Carpenter
#x27;[media] dvb core: must check dvb_create_media_graph()'). Signed-off-by: Dan Carpenter diff --git a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c index 6477b04..a04c0a2 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/usb/dvb-usb

re: [media] cec: add HDMI CEC framework (adapter)

2016-06-29 Thread Dan Carpenter
, "Reported physical address %04x for logical address %d\n", 1448 adap->phys_addrs[init_laddr], init_laddr); 1449 break; 1450 1451 case CEC_MSG_USER_CONTROL_PRESSED: regards, dan carpenter -- To unsubscribe from this list:

[bug report] [media] cec-funcs.h: static inlines to pack/unpack CEC messages

2016-07-05 Thread Dan Carpenter
1158 len = 13; 1159 memcpy(osd, msg->msg + 3, len); 1160 osd[len] = '\0'; 1161 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel

[patch] [media] v4l: xilinx: missing error code

2015-06-24 Thread Dan Carpenter
We should set "ret" on this error path instead of returning success. Fixes: df3305156f98 ('[media] v4l: xilinx: Add Xilinx Video IP core') Signed-off-by: Dan Carpenter diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c in

Re: [PATCH 6/7] media: au0828 change to use Managed Media Controller API

2015-07-20 Thread Dan Carpenter
media_device_unregister_entity_notify(dev->media_dev, &dev->entity_notify); media_device_unregister(dev->media_dev); dev->media_dev = NULL; } Aligning if statements using spaces like that is nicer and checkpa

Re: [PATCH 7/7] sound/usb: Update ALSA driver to use Managed Media Controller API

2015-07-20 Thread Dan Carpenter
t; + "%s->%s to %s. Error %d\n", Add a space after "link". "Couldn't change tuner link ", "%s->%s to %s. Error %d\n", regards, dan carpenter -- To unsub

Re: [PATCH 6/7] media: au0828 change to use Managed Media Controller API

2015-07-20 Thread Dan Carpenter
media_device_unregister(dev->media_dev); > > dev->media_dev = NULL; > > } > > > > Aligning if statements using spaces like that is nicer and checkpatch.pl > > won't complain. > > > > Yeah. I try to do that whenever. In this

Re: [PATCH 1/2] staging:media:lirc Remove the extra braces in if statement of lirc_imon

2015-08-03 Thread Dan Carpenter
wrote: > From: pradheep This is still wrong. 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] Staging: media: davinci_vpfe: Fix over 80 characters coding style issue

2015-08-08 Thread Dan Carpenter
On Sat, Aug 08, 2015 at 01:30:48AM -0500, Junsu Shin wrote: > This is a patch to the dm365_ipipe.c that fixes over 80 characters warning > detected. > Signed-off-by: Junsu Shin Put a blank line before the Signed-off-by. regards, dan carpenter -- To unsubscribe from this list: send

re: [media] netup_unidvb: NetUP Universal DVB-S/S2/T/T2/C PCI-E card driver

2015-08-19 Thread Dan Carpenter
k_irqsave(&spi->lock, flags); See also: drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:238 netup_spi_release() error: we previously assumed 'spi' could be null (see line 237) regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linu

Re: [PATCH 1/3] [media] au0828-video: Use kcalloc() in au0828_init_isoc()

2016-10-25 Thread Dan Carpenter
On Mon, Oct 24, 2016 at 10:59:24PM +0200, SF Markus Elfring wrote: > + dev->isoc_ctl.transfer_buffer = kcalloc(num_bufs, > + sizeof(*dev->isoc_ctl > +.transfer_buffer), This is ugly

Re: [PATCH 3/3] [media] au0828-video: Move two assignments in au0828_init_isoc()

2016-10-25 Thread Dan Carpenter
This patch introduces bugs. It's my policy to not explain the Markus's bugs because otherwise he will just resend the patchset and I have asked him many times to stop. I will happily review bug fix patches but I really think he should stop sending these cleanup patches. regards, dan

[bug report] [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver

2016-11-09 Thread Dan Carpenter
rame=%d (%d,%d, %d) vb=%p", 544 ctx->id, buf->type, buf->index, 545 mtkbuf->lastframe, buf->bytesused, 546 buf->m.planes[0].bytesused, buf->length, 547 vb);

Re: [bug report] [media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver

2016-11-10 Thread Dan Carpenter
On Wed, Nov 09, 2016 at 02:45:21PM +0100, Hans Verkuil wrote: > On 11/09/16 14:28, Dan Carpenter wrote: > >Hello Tiffany Lin, > > > >The patch 590577a4e525: "[media] vcodec: mediatek: Add Mediatek V4L2 > >Video Decoder Driver" from Sep 2, 2016, leads to th

[bug report] [media] dib0700_core: don't use stack on I2C reads

2016-11-14 Thread Dan Carpenter
UT); 268 mutex_unlock(&d->usb_mutex); 269 if (result < 0) { 270 deb_info("i2c write error (status = %d)\n", result); 271 break; 272 } 273 } 274 } 275 mutex_unlock(&d->i2c_mutex); 276 return i; 277 } 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: [bug report] [media] dib0700_core: don't use stack on I2C reads

2016-11-14 Thread Dan Carpenter
338 drivers/media/usb/dvb-usb/dib0700_core.c:338 dib0700_i2c_xfer_legacy() warn: inconsistent returns 'mutex:&d->usb_mutex'. Locked on: line 301 line 322 Unlocked on: line 287 line 291 line 338 regards, dan carpenter -- To unsubsc

[patch] [media] stk-webcam: fix an endian bug in stk_camera_read_reg()

2016-11-15 Thread Dan Carpenter
We pass an int pointer to stk_camera_read_reg() but only write to the highest byte. It's a bug on big endian systems and generally a nasty thing to do and doesn't match the write function either. Signed-off-by: Dan Carpenter diff --git a/drivers/media/usb/stkwebcam/stk-webcam.h

[patch v2] [media] stk-webcam: fix an endian bug in stk_camera_read_reg()

2016-11-16 Thread Dan Carpenter
We pass an int pointer to stk_camera_read_reg() but only write to the highest byte. It's a bug on big endian systems and generally a nasty thing to do and doesn't match the write function either. Signed-off-by: Dan Carpenter --- v2: I forgot to update stk-sensor.c in version 1. di

[patch] Staging: media: davinci_vpfe: unlock on error in vpfe_reqbufs()

2016-11-18 Thread Dan Carpenter
We should unlock before returning this error code in vpfe_reqbufs(). Fixes: 622897da67b3 ("[media] davinci: vpfe: add v4l2 video driver support") Signed-off-by: Dan Carpenter diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_vid

[patch] [media] uvcvideo: freeing an error pointer

2016-11-25 Thread Dan Carpenter
A recent cleanup introduced a potential dereference of -EFAULT when we call kfree(map->menu_info). Fixes: 4cc5bed1caeb ("[media] uvcvideo: Use memdup_user() rather than duplicating its implementation") Signed-off-by: Dan Carpenter diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/

Re: [patch] [media] uvcvideo: freeing an error pointer

2016-11-25 Thread Dan Carpenter
up a patch. Feel free to send it. ;) 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] uvcvideo: freeing an error pointer

2016-11-25 Thread Dan Carpenter
been allocated. That honestly seems like a simple rule to me, whenever I touch error handling code it feels better and simpler after I fix the bugs. Error handling doesn't have to be complicated if you just follow the rules. regards, dan carpenter -- To unsubscribe from this list: send

[patch] [media] media: ti-vpe: vpdma: fix a timeout loop

2016-11-25 Thread Dan Carpenter
eanup APIs") Signed-off-by: Dan Carpenter diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti-vpe/vpdma.c index 13bfd71..23472e3 100644 --- a/drivers/media/platform/ti-vpe/vpdma.c +++ b/drivers/media/platform/ti-vpe/vpdma.c @@ -453,7 +453,7 @@ int vpdma_list_cleanup(st

[bug report] [media] lirc: prevent use-after free

2016-11-26 Thread Dan Carpenter
cdev_del(cdev); Can't pass NULLs to this function. 191 return retval; 192 } 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] uvcvideo: freeing an error pointer

2016-11-28 Thread Dan Carpenter
rs that weren't allocated"... It's garbage code. But I understand that other people don't agree. 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] uvcvideo: freeing an error pointer

2016-11-30 Thread Dan Carpenter
On Mon, Nov 28, 2016 at 04:49:36PM +0200, Laurent Pinchart wrote: > Hi Julia and Dan, > > On Monday 28 Nov 2016 14:54:58 Julia Lawall wrote: > > On Mon, 28 Nov 2016, Dan Carpenter wrote: > > > I understand the comparison, but I just think it's better if people > &

Re: [patch] [media] uvcvideo: freeing an error pointer

2016-11-30 Thread Dan Carpenter
one thing at a time, and empirically just from looking at which code has the most bugs, then single exit labels are the most buggy. 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] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-12 Thread Dan Carpenter
You will never win an ELIZA bot challenge against Markus. :P I admire your optimism though. 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.

[patch] [media] blackfin: check devm_pinctrl_get() for errors

2016-07-14 Thread Dan Carpenter
devm_pinctrl_get() can fail so we should check for that. Fixes: 0a6824bc10de ('[media] v4l2: blackfin: select proper pinctrl state in ppi_set_params if CONFIG_PINCTRL is enabled') Signed-off-by: Dan Carpenter diff --git a/drivers/media/platform/blackfin/ppi.c b/drivers/media/platfor

re: [media] vivid: add support for radio receivers and transmitters

2015-09-16 Thread Dan Carpenter
drivers/media/platform/vivid/vivid-rds-gen.c:92 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 86 drivers/media/platform/vivid/vivid-rds-gen.c:93 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 87 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 06/19] staging: media: omap4iss: fix handling platform_get_irq result

2015-09-24 Thread Dan Carpenter
On Thu, Sep 24, 2015 at 04:00:14PM +0200, Andrzej Hajda wrote: > Hi, > > To avoid problems with too many mail recipients I have sent whole > patchset only to LKML. Anyway patches have no dependencies. > I'm pretty sure mailman or whatever counts CCs as recipients as

re: [media] hackrf: add support for transmitter

2015-10-21 Thread Dan Carpenter
free(&dev->rx_ctrl_handler); 1530 err_kfree: 1531 kfree(dev); 1532 err: 1533 dev_dbg(dev->dev, "failed=%d\n", ret); ^^^ "dev" is either freed or NULL. Also this change is basically unrelated to adding transmitter

re: [media] go7007: don't continue if firmware can't be loaded

2015-10-22 Thread Dan Carpenter
usb_rcvbulkpipe(usb->usbdev, 8), 1303 usb->audio_urbs[i]->transfer_buffer, 4096, 1304 go7007_usb_read_audio_pipe_complete, go); 1305 } 1306 } regards, dan carpenter -- To un

[patch] [media] uvcvideo: small cleanup in uvc_video_clock_update()

2015-10-22 Thread Dan Carpenter
Smatch is not smart enough to see that "&stream->clock.lock" and "&clock->lock" are the same thing so it complains about the locking here. Let's make it more consistent. Signed-off-by: Dan Carpenter diff --git a/drivers/media/usb/uvc/uvc_video.c b/

[patch 1/2] [media] av7110: don't allow negative volumes

2015-11-10 Thread Dan Carpenter
The issue here is that we there is a static checker warning because we have a user controlled volume setting and we cap the upper bound but we allow negative numbers. Negative volumes don't make sense, so let's make these variables unsigned. Signed-off-by: Dan Carpenter diff --git

[patch 2/2] [media] av7110: potential divide by zero

2015-11-10 Thread Dan Carpenter
"len" comes from dvb_video_ioctl() and there is a possibility that it is zero. We do a divide by len later in the function so that's not ok. Signed-off-by: Dan Carpenter diff --git a/drivers/media/pci/ttpci/av7110_av.c b/drivers/media/pci/ttpci/av7110_av.c index ccb3b2c..1cf90

Re: [PATCH] [media] lirc_imon: do not leave imon_probe() with mutex held

2015-11-16 Thread Dan Carpenter
mutex_unlock(&context->ctx_lock); > usb_free_urb(tx_urb); Now the label name doesn't make sense. Also this unlock isn't needed because we are just going to free context 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: [media] media-entity: protect object creation/removal using spin lock

2015-12-14 Thread Dan Carpenter
v->lock); Do we need this unlock any more? Haven't we freed the lock on the previous line? 782 } 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] media-entity: protect object creation/removal using spin lock

2015-12-14 Thread Dan Carpenter
On Mon, Dec 14, 2015 at 06:00:52PM -0200, Mauro Carvalho Chehab wrote: > I guess gcc optimizer actually does the right thing, but we should > fix it to remove the static analyzer warnings. It probably crashes if you enable poisoning freed memory? (I haven't tested). regards, da

[patch] [media] media_entity: logical vs bitwise AND typo

2015-12-15 Thread Dan Carpenter
This was obviously supposed to be a bitwise AND. Fixes: 403da6ca3465 ('[media] media: move MEDIA_LNK_FL_INTERFACE_LINK logic to link creation') Signed-off-by: Dan Carpenter diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index 7895e17..6926e06 100644 ---

[patch] [media] media-device: copy_to/from_user() returns positive

2015-12-15 Thread Dan Carpenter
The copy_to/from_user() functions return the number of bytes *not* copied. They don't return error codes. Fixes: 4f6b3f363475 ('media] media-device: add support for MEDIA_IOC_G_TOPOLOGY ioctl') Signed-off-by: Dan Carpenter diff --git a/drivers/media/media-device.c b/driv

[patch] [media] v4l2-device: fix a missing error code

2015-12-15 Thread Dan Carpenter
We need to set "err = -ENOMEM" here. Fixes: 38b11f19667a ('[media] v4l2-core: create MC interfaces for devnodes') Signed-off-by: Dan Carpenter diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c index 85f724b..85b1e98 100644 --- a/dri

Re: [PATCH] [media] gsc-m2m: Use an unsigned data type for a variable

2015-12-19 Thread Dan Carpenter
if (mutex_lock_interruptible(&gsc->lock)) > return -ERESTARTSYS; I'm suspect returning -ERESTARTSYS is a bug. 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: rtl2832_sdr: move from staging to media

2015-05-13 Thread Dan Carpenter
return 0; 1267 1268 if (fe->ops.tuner_ops.set_params) 1269 ret = fe->ops.tuner_ops.set_params(fe); 1270 else 1271 ret = 0; 1272 break; 1273 default: regards, dan carpenter -- To

[patch] [media] rtl2832_sdr: cleanup some set_bit() calls

2015-05-14 Thread Dan Carpenter
. Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb-frontends/rtl2832_sdr.c index 3ff8806..6362c6c 100644 --- a/drivers/media/dvb-frontends/rtl2832_sdr.c +++ b/drivers/media/dvb-frontends/rtl2832_sdr.c @@ -108,8 +108,8 @@ struct

re: V4L/DVB (6059): ivtv: log stereo/bilingual audio modes

2015-05-18 Thread Dan Carpenter
^ Probably this bitwise NOT is a typo? In other words: (itv->dualwatch_stereo_mode & 0x300) == 0x200 ? " (Bilingual)" : ""); 1535 if (has_output) { regards, dan carpenter -- To unsubscribe from this list: send th

Re: [PATCH 2/2] drivers: Simplify the return code

2015-05-19 Thread Dan Carpenter
fly, so it would be interesting to see a thourough scientific paper on it). Also the goto err style code introduces a new class of "forgot to set the error code" bugs which are not there in direct return code. regards, dan carpenter -- To unsubscribe from this list: send the line &quo

[patch] [media] m88ds3103: a couple missing error codes

2015-06-02 Thread Dan Carpenter
We need to set some error codes here. Fixes: f01919e8f54f ('[media] m88ds3103: add I2C client binding') Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c index 01b9ded..7b21f1a 100644 --- a/drivers/media/dvb

[patch] [media] gspca: sn9c2028: remove an unneeded condition

2015-06-04 Thread Dan Carpenter
We already know status is negative because of the earlier check so there is no need to check again. Signed-off-by: Dan Carpenter diff --git a/drivers/media/usb/gspca/sn9c2028.c b/drivers/media/usb/gspca/sn9c2028.c index c75b738..4f2050a 100644 --- a/drivers/media/usb/gspca/sn9c2028.c +++ b

[PATCH] [media] dvb-core: prevent some corruption the legacy ioctl

2015-06-06 Thread Dan Carpenter
Quite a few of the ->diseqc_send_master_cmd() implementations don't check cmd->msg_len so it can lead to memory corruption. Signed-off-by: Dan Carpenter --- I don't think it ever makes sense for ->msg_len to be longer than ->msg but I am a newbie to this code. diff --g

Re: [Y2038] [PATCH] Staging: media: lirc: Replace timeval with ktime_t

2015-06-09 Thread Dan Carpenter
ogit-fallback > --norolestats --file That command works fine. > > I'll use instead ./scripts/get_maintainer.pl --file and send a v2. No need. You sent it to linux-media@vger.kernel.org and Mauro the first time. Just be patient. regards, dan carpenter -- To unsubscribe from this list:

Re: [PATCH] staging: media: lirc: fix coding style error

2015-06-19 Thread Dan Carpenter
inor:%d)\n", minor); Not quite. The original is: [tab][tab][space][space][space][space][space][space][space][space][space]"Dere... You have: [tab][tab][tab]"Deregistered Sasem driver ... It should be: [tab][tab][tab][space]"Deregistered Sasem driver (minor:%d)\n", minor)

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

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

[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

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

[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

[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

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

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

[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

[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

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

Re: [PATCH] [media] dvb: negative value assigned to unsigned int in CDRXD().

2012-03-06 Thread Dan Carpenter
changelogs could you please write something about how this change will affect what the user sees. That way users know if it fixes something they care about and they will apply your patch. regards, dan carpenter signature.asc Description: Digital signature

[patch] [media] gpio-ir-recv: a couple signedness bugs

2012-03-10 Thread Dan Carpenter
the type that gpio_get_value_cansleep() returns and we test for negative returns. Signed-off-by: Dan Carpenter diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index 6744479..0d87545 100644 --- a/drivers/media/rc/gpio-ir-recv.c +++ b/drivers/media/rc/gpio-ir-recv.c @@

Re: go7007 patch for 3.2.11

2012-03-20 Thread Dan Carpenter
h to yourself first and verify that it applies. Read Documentation/SubmittingPatches. There are bunch of tutorials on how to submit patches online as well. http://www.tuxradar.com/content/newbies-guide-hacking-linux-kernel regards, dan carpenter signature.asc Description: Digital signature

Re: go7007 patch for 3.2.11

2012-03-20 Thread Dan Carpenter
Also the patch has to apply against linux-next not 3.2.11. Probably that is explained in the link I sent... regards, dan carpenter signature.asc Description: Digital signature

[patch] [media] uvcvideo: remove unneeded access_ok() check

2012-03-20 Thread Dan Carpenter
copy_in_user() already checks for write permission, so we don't need to do it here. This was added in 1a5e4c867c "[media] uvcvideo: Implement compat_ioctl32 for custom ioctls". Signed-off-by: Dan Carpenter diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video

[patch] [media] mxl111sf: remove an unused variable

2012-03-23 Thread Dan Carpenter
We don't use this any more after 3be5bb71fb "[media] mxl111sf: fix error on stream stop in mxl111sf_ep6_streaming_ctrl()" and it makes GCC complain. Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb/dvb-usb/mxl111sf.c b/drivers/media/dvb/dvb-usb/mxl111sf.c index 8

re: [media] tda10071: NXP TDA10071 DVB-S/S2 driver

2012-04-17 Thread Dan Carpenter
ves the last 7 bytes of cmd.args unitialized. Btw, why are the sizes specified in hex instead of decimal here? 323 cmd.len = 0x07 + diseqc_cmd->msg_len; 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] pluto2: remove some dead code

2012-04-17 Thread Dan Carpenter
buf[] is a 4 character array. Perhaps this was some debugging code from back in the day? Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c index e1f20c2..f148b19 100644 --- a/drivers/media/dvb/pluto2/pluto2.c +++ b/drivers/media

Re: [PATCH] Staging: go7007: detector features - add new tuning option

2012-04-18 Thread Dan Carpenter
x) >> 4); > - go->modet_map[mbnum] = region; > - } > - clip_ptr = clip.next; > +static int RectToModetMap( > + struct go7007 *go, > + char Region, > + struct v4l2_rect *Rect, > + int Del

Re: Subject: [PATCH] [Trivial] Staging: go7007: wis-tw2804 upstyle to v4l2

2012-04-19 Thread Dan Carpenter
t (in a separate patch) the format would be: printk(KERN_ERR "wis-tw2804: channel %d is not between 0 and 3!\n", *input); When people submit big patches there is a lot to complain about

re: [media] fintek-cir: add support for newer chip version

2012-04-19 Thread Dan Carpenter
= LOGICAL_DEV_CIR_REV2; 202 else 203 fintek->logical_dev_cir = LOGICAL_DEV_CIR_REV1; 204 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 majordo

[patch] [media] saa7164: saa7164_vbi_stop_port() returns linux error codes

2012-04-19 Thread Dan Carpenter
The saa7164_vbi_stop_port() changes the SAA_ERR_ALREADY_STOPPED result code to -EIO before returning. Signed-off-by: Dan Carpenter diff --git a/drivers/media/video/saa7164/saa7164-vbi.c b/drivers/media/video/saa7164/saa7164-vbi.c index 273cf80..d8e6c8f 100644 --- a/drivers/media/video/saa7164

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

2012-04-20 Thread Dan Carpenter
"stat" is always zero here. The condition used to be needed, but we shifted stuff around in 0f0b270f90 "[media] ngene: CXD2099AR Common Interface driver". This doesn't change how the code works, it's just a bit tidier. Signed-off-by: Dan Carpenter diff --git a

Re: [PATCH] [Trivial] staging: go7007: Framesizes features

2012-04-21 Thread Dan Carpenter
correct anything, it just adds new features that weren't supported before. Don't put [Trivial] in the subject line. Trivial patches are things like spelling mistakes in comments. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-media" in

<    1   2   3   4   5   6   7   8   >