summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2015-05-01[media] bttv: fix audio hooksMauro Carvalho Chehab
as reported by smatch: drivers/media/pci/bt8xx/bttv-audio-hook.c:201 lt9415_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:241 winfast2000_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:276 pvbt878p9b_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:307 fv2000s_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:334 windvr_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:371 adtvk503_audio() warn: bitwise AND condition is false here there are some serious issues at the audio hook implementation. They're not following what's specified at the DocBook: http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-g-tuner.html#tuner-audmode Basically, it was assuming that the audmode (V4L2_TUNER_MODE_foo) is a variable with a bit maskk. However, it isn't. The bitmask only applies to rxsubchans field (V4L2_TUNER_SUB_foo). As the code is also too complex, and not all hooks were returning both audmode and rxsubchans to a VIDIOC_G_TUNER, rewrite the functions, in order to fix both for get and set tuner ioctls. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] tda10086: change typecast to u64 to avoid smatch warningsMauro Carvalho Chehab
drivers/media/dvb-frontends/tda10086.c:476 tda10086_get_frontend() warn: should 'tda10086_read_byte(state, 81) << 8' be a 64 bit type? Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] s5h1420: use only one statement per lineMauro Carvalho Chehab
drivers/media/dvb-frontends/s5h1420.c:565 s5h1420_setfec_inversion() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] stv0900: fix bad indentingMauro Carvalho Chehab
drivers/media/dvb-frontends/stv0900_sw.c:1559 stv0900_search_srate_fine() warn: inconsistent indenting drivers/media/dvb-frontends/stv0900_sw.c:2012 stv0900_algo() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] cx25840: fix bad identingMauro Carvalho Chehab
drivers/media/i2c/cx25840/cx25840-core.c:974 input_change() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] pvrusb2: fix inconsistent indentingMauro Carvalho Chehab
smatch complains about multiple issues here: drivers/media/usb/pvrusb2/pvrusb2-context.c:402 pvr2_channel_claim_stream() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-ioread.c:240 pvr2_ioread_setup() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-ioread.c:255 pvr2_ioread_set_enabled() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-ioread.c:485 pvr2_ioread_read() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-io.c:522 pvr2_stream_set_callback() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-io.c:561 pvr2_stream_set_buffer_count() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-io.c:640 pvr2_buffer_queue() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-io.c:667 pvr2_buffer_set_buffer() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-io.c:668 pvr2_buffer_set_buffer() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2614 pvr2_hdw_create() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2740 pvr2_hdw_destroy() warn: inconsistent indenting drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3353 pvr2_hdw_trigger_module_log() warn: inconsistent indenting Let's get rid of those, in order to cleanup as much as possible the smatch error log. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] stk014: fix bad indentingMauro Carvalho Chehab
drivers/media/usb/gspca/stk014.c:279 sd_start() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] sonixj: fix bad indentingMauro Carvalho Chehab
drivers/media/usb/gspca/sonixj.c:1792 expo_adjust() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] redrat3: change return argument on redrat3_send_cmd() to intMauro Carvalho Chehab
redrat3_send_cmd() can return an error or the read data. However, it currently returns an u8, as reported by smatch: drivers/media/rc/redrat3.c:416 redrat3_send_cmd() warn: signedness bug returning '(-12)' Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] vp702x: comment dead codeMauro Carvalho Chehab
Since the first version of this driver, the remote controller code is disabled, adding an early return inside vp702x_rc_query(). Let's disable the code with #if 0, to remove this warning: drivers/media/usb/dvb-usb/vp702x.c:268 vp702x_rc_query() info: ignoring unreachable code. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] go7007: Comment some dead codeMauro Carvalho Chehab
drivers/media/usb/go7007/go7007-usb.c:1099 go7007_usb_probe() info: ignoring unreachable code. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] dib0070: Fix indentingMauro Carvalho Chehab
The indentation on this driver were deadly broken. On lots of places, it was using 4 spaces instead of tab to indent. On other parts, it were using tabs. Also, on several places, it were not even being properly aligned, as reported by smatch: drivers/media/dvb-frontends/dib0070.c:179 dib0070_set_bandwidth() warn: inconsistent indenting drivers/media/dvb-frontends/dib0070.c:198 dib0070_captrim() warn: inconsistent indenting drivers/media/dvb-frontends/dib0070.c:246 dib0070_set_ctrl_lo5() warn: inconsistent indenting drivers/media/dvb-frontends/dib0070.c:260 dib0070_ctrl_agc_filter() warn: inconsistent indenting drivers/media/dvb-frontends/dib0070.c:494 dib0070_tune_digital() warn: inconsistent indenting drivers/media/dvb-frontends/dib0070.c:498 dib0070_tune_digital() warn: inconsistent indenting drivers/media/dvb-frontends/dib0070.c:655 dib0070_reset() warn: inconsistent indenting drivers/media/dvb-frontends/dib0070.c:711 dib0070_reset() warn: curly braces intended? drivers/media/dvb-frontends/dib0070.c:713 dib0070_reset() warn: inconsistent indenting My first idea were to leave it as-is or to just touch the above. However, this won't be fixing anything. So, as painful as it is, let's fix indentation globally on the driver, and then address the inconsistencies. Hopefully, this driver doesn't have much patches, so it likely won't conflict to any other patch during this merge window. Besides the big size of this patch, no functional changes were done. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] dib3000mc: fix bad indentingMauro Carvalho Chehab
drivers/media/dvb-frontends/dib3000mc.c:149 dib3000mc_setup_pwm_state() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] cx231xx: fix bad indentingMauro Carvalho Chehab
drivers/media/usb/cx231xx/cx231xx-avcore.c:1598 cx231xx_set_DIF_bandpass() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:656 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:659 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:664 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:669 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:673 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-417.c:1164 cx231xx_initialize_codec() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] ov7670: check read error also for REG_AECHH on ov7670_s_exp()Mauro Carvalho Chehab
ov7670_s_exp() checks read error for 2 registers: REG_COM1 and REG_COM8. But, although it uses the value latter, it doesn't check errors on REG_AECHH read. Yet, as it is doing a bitmask operation there, the read operation should succeed. So, fix the code to also check if this succeeded. This fixes this smatch report: drivers/media/i2c/ov7670.c:1366 ov7670_s_exp() warn: inconsistent indenting Compile-tested only. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] stv0297: change typecast to u64 to avoid smatch warningsMauro Carvalho Chehab
drivers/media/dvb-frontends/stv0297.c:140 stv0297_get_symbolrate() warn: should 'stv0297_readreg(state, 86) << 8' be a 64 bit type? drivers/media/dvb-frontends/stv0297.c:141 stv0297_get_symbolrate() warn: should 'stv0297_readreg(state, 87) << 16' be a 64 bit type? drivers/media/dvb-frontends/stv0297.c:142 stv0297_get_symbolrate() warn: should 'stv0297_readreg(state, 88) << 24' be a 64 bit type? Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] zl10353: fix indentingMauro Carvalho Chehab
drivers/media/dvb-frontends/zl10353.c:536 zl10353_read_ucblocks() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] bttv: fix indentingMauro Carvalho Chehab
drivers/media/pci/bt8xx/bttv-driver.c:2679 bttv_s_fbuf() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] r820t: fix identingMauro Carvalho Chehab
drivers/media/tuners/r820t.c:945 r820t_sysfreq_sel() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] tda1004x: fix identationMauro Carvalho Chehab
drivers/media/dvb-frontends/tda1004x.c:653 tda10046_init() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] mantis: remove dead codeMauro Carvalho Chehab
drivers/media/pci/mantis/mantis_cards.c:229 mantis_pci_probe() info: ignoring unreachable code. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] qt1010: avoid going past arrayMauro Carvalho Chehab
As reported by smatch: drivers/media/tuners/qt1010.c:357 qt1010_init() error: buffer overflow 'i2c_data' 34 <= 34 This should not happen with the current code, as the i2c_data array doesn't end with a QT1010_M1, but it doesn't hurt add a BUG_ON to notify if one modifies it and breaks. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] vivid-radio-rx: Don't go past bufferMauro Carvalho Chehab
drivers/media/platform/vivid/vivid-radio-rx.c:198 vivid_radio_rx_s_hw_freq_seek() error: buffer overflow 'vivid_radio_bands' 3 <= 3 Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] zc3xx: remove dead code and uneeded gotosMauro Carvalho Chehab
As reported by smatch: drivers/media/usb/gspca/zc3xx.c:5994 transfer_update() info: ignoring unreachable code. That happens because there's a return that it is never called, as the work queue runs an infinite loop, except when the device is put to sleep or an error happens. When an error happens, a break statement is enough to go out of the loop. So, let's remove the goto, as break is the typical instruction used to end a loop. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] zc3xx: don't go past quality arrayMauro Carvalho Chehab
drivers/media/usb/gspca/zc3xx.c:6363 zcxx_s_ctrl() error: buffer overflow 'jpeg_qual' 3 <= 3 Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] cx24117: fix a buffer overflow when checking userspace paramsMauro Carvalho Chehab
The maximum size for a DiSEqC command is 6, according to the userspace API. However, the code allows to write up much more values: drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23 Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] af9013: Don't accept invalid bandwidthMauro Carvalho Chehab
If userspace sends an invalid bandwidth, it should either return EINVAL or switch to auto mode. This driver will go past an array and program the hardware on a wrong way if this happens. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] cx24116: fix a buffer overflow when checking userspace paramsMauro Carvalho Chehab
The maximum size for a DiSEqC command is 6, according to the userspace API. However, the code allows to write up much more values: drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23 Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] s5h1420: fix a buffer overflow when checking userspace paramsMauro Carvalho Chehab
The maximum size for a DiSEqC command is 6, according to the userspace API. However, the code allows to write up to 7 values: drivers/media/dvb-frontends/s5h1420.c:193 s5h1420_send_master_cmd() error: buffer overflow 'cmd->msg' 6 <= 7 Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] stv0288: fix indentationMauro Carvalho Chehab
drivers/media/dvb-frontends/stv0288.c:137 stv0288_set_symbolrate() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] lgdt3306a: fix indentationMauro Carvalho Chehab
drivers/media/dvb-frontends/lgdt3306a.c:2104 lgdt3306a_DumpRegs() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] dib3000mc: Fix indentationMauro Carvalho Chehab
drivers/media/dvb-frontends/dib3000mc.c:134 dib3000mc_setup_pwm_state() warn: inconsistent indenting drivers/media/dvb-frontends/dib3000mc.c:144 dib3000mc_setup_pwm_state() warn: inconsistent indenting drivers/media/dvb-frontends/dib3000mc.c:420 dib3000mc_sleep() warn: inconsistent indenting drivers/media/dvb-frontends/dib3000mc.c:453 dib3000mc_set_channel_cfg() warn: inconsistent indenting The last one is actually due to a commented code. Let's rework it, in order to remove the sparse warning without removing the dead code, as it may be useful in the future. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] bcm3510: fix indentationMauro Carvalho Chehab
drivers/media/dvb-frontends/bcm3510.c:688 bcm3510_reset() warn: inconsistent indenting drivers/media/dvb-frontends/bcm3510.c:711 bcm3510_clear_reset() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] benq: fix indentationMauro Carvalho Chehab
drivers/media/usb/gspca/benq.c:239 sd_isoc_irq() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] go7007: don't use vb before test if it is not NULLMauro Carvalho Chehab
As reported by smatch: drivers/media/usb/go7007/go7007-driver.c:452 frame_boundary() warn: variable dereferenced before check 'vb' (see line 449) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] qt1010: Reduce text size by using static constMauro Carvalho Chehab
Using static const allows the compiler to optimize the code. Before static const: text data bss dec hex filename 4982 524 1568 7074 1ba2 drivers/media/tuners/qt1010.o After static const: text data bss dec hex filename 4714 524 1568 6806 1a96 drivers/media/tuners/qt1010.o Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] wl128x: fix int type for streg_cbdataMauro Carvalho Chehab
The streg_cbdata can have a negative error value. So, it should be an integer, and not u8, as reported by smatch: drivers/media/radio/wl128x/fmdrv_common.c:1517 fmc_prepare() warn: assigning (-115) to unsigned variable 'fmdev->streg_cbdata' Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] ir-sony-decoder: shutup smatch warningsMauro Carvalho Chehab
There are some false-positive warnings produced by smatch: drivers/media/rc/ir-sony-decoder.c:129 ir_sony_decode() warn: missing break? reassigning 'data->state' drivers/media/rc/ir-sony-decoder.c:137 ir_sony_decode() warn: missing break? reassigning 'data->state' drivers/media/rc/ir-sony-decoder.c:165 ir_sony_decode() warn: missing break? reassigning 'data->state' This is due to the logic used there to detect the need of a break. While those are false positives, it is easy to get rid of them without any drawbacks. The side effect is a cleaner function, with is good. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] s5p_mfc: remove a dead codeMauro Carvalho Chehab
As reported by smatch: drivers/media/platform/s5p-mfc/s5p_mfc.c:1340 s5p_mfc_runtime_resume() warn: this array is probably non-NULL. 'm_dev->alloc_ctx' alloc_ctx can never be NULL, as it is embeeded inside the struct s5p_mfc_dev. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] s3c-camif: Check if fmt is NULL before useMauro Carvalho Chehab
As reported by smatch: drivers/media/platform/s3c-camif/camif-capture.c:463 queue_setup() warn: variable dereferenced before check 'fmt' (see line 460) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] zoran: fix indentMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/zoran/zoran_device.c:1594 zoran_init_hardware() warn: inconsistent indenting Fix indent. While here, fix CodingStyle and remove dead code, as it can always be recovered from git logs. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] ivtv: avoid going past input/audio arrayMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/ivtv/ivtv-driver.c:832 ivtv_init_struct2() error: buffer overflow 'itv->card->video_inputs' 6 <= 6 That happens because nof_inputs and nof_audio_inputs can be initialized as IVTV_CARD_MAX_VIDEO_INPUTS, instead of IVTV_CARD_MAX_VIDEO_INPUTS - 1. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] radio-si476x: Fix indentMauro Carvalho Chehab
As reported by smatch: drivers/media/radio/radio-si476x.c:571 si476x_radio_do_post_powerup_init() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] saa717x: fix multi-byte read codeMauro Carvalho Chehab
As reported by smatch: drivers/media/i2c/saa717x.c:155 saa717x_read() warn: mask and shift to zero drivers/media/i2c/saa717x.c:155 saa717x_read() warn: mask and shift to zero This is done right at saa717x_write(), but the read function is broken. Thankfully, there's just one place at saa717x driver that uses multibyte read (for status report, via printk). Yet, let's fix it. From saa717x_write(), it is clear that the bytes are in little endian: mm1[4] = (value >> 16) & 0xff; mm1[3] = (value >> 8) & 0xff; mm1[2] = value & 0xff; So, the same order should be valid for read too. Compile-tested only. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] saa7164: Check if dev is NULL before dereferencing itMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/saa7164/saa7164-core.c:631 saa7164_irq() warn: variable dereferenced before check 'dev' (see line 621) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] ngene: preventing dereferencing a NULL pointerMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/ngene/ngene-core.c:1529 init_channel() error: we previously assumed 'chan->fe' could be null (see line 1521) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] saa7134: fix indent issuesMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/saa7134/saa7134-cards.c:7197 saa7134_xc2028_callback() warn: inconsistent indenting drivers/media/pci/saa7134/saa7134-cards.c:7846 saa7134_board_init2() warn: inconsistent indenting drivers/media/pci/saa7134/saa7134-cards.c:7913 saa7134_board_init2() warn: inconsistent indenting While here, fix a few CodingStyle issues on the affected code Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] cx18: avoid going past input/audio arrayMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/cx18/cx18-driver.c:807 cx18_init_struct2() error: buffer overflow 'cx->card->video_inputs' 6 <= 6 That happens because nof_inputs and nof_audio_inputs can be initialized as CX18_CARD_MAX_VIDEO_INPUTS, instead of CX18_CARD_MAX_VIDEO_INPUTS - 1. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] rc: fix bad indentingMauro Carvalho Chehab
drivers/media/rc/rc-main.c:749 rc_close() warn: inconsistent indenting There's an extra space there. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] am437x: remove unused variableMauro Carvalho Chehab
drivers/media/platform/am437x/am437x-vpfe.c: In function 'vpfe_get_subdev_input_index': drivers/media/platform/am437x/am437x-vpfe.c:1679:27: warning: variable 'sdinfo' set but not used [-Wunused-but-set-variable] struct vpfe_subdev_info *sdinfo; ^ Cc: Benoit Parrot <bparrot@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>