summaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/xc4000.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab2017-11-01 22:05:44 +0100
committerMauro Carvalho Chehab2017-12-11 19:04:51 +0100
commit02d7324337c0223f3775d539380e32f603646a52 (patch)
tree2579709a778712acb375ef4863dd19b6606a7bf7 /drivers/media/tuners/xc4000.c
parentmedia: qt1010: fix bogus warnings (diff)
downloadkernel-qcow2-linux-02d7324337c0223f3775d539380e32f603646a52.tar.gz
kernel-qcow2-linux-02d7324337c0223f3775d539380e32f603646a52.tar.xz
kernel-qcow2-linux-02d7324337c0223f3775d539380e32f603646a52.zip
media: radio-si476x: fix behavior when seek->range* are defined
The logic at si476x_radio_s_hw_freq_seek() checks if the frequency range that will be used to handle hardware seek has the minimal frequency under rangelow. That works fine if userspace zeros both fields. However, if userspace fills either seek->rangelow or seek-rangehigh, it won't read the corresponding range from the device, causing the values to be unitialized, as warned by smatch: drivers/media/radio/radio-si476x.c:789 si476x_radio_s_hw_freq_seek() error: uninitialized symbol 'rangelow'. drivers/media/radio/radio-si476x.c:789 si476x_radio_s_hw_freq_seek() error: uninitialized symbol 'rangehigh'. Fix it by initializing those vars from the values present at the struct v4l2_hw_freq_seek. While here, simplify the logic which reads such values from the hardware limits. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/tuners/xc4000.c')
0 files changed, 0 insertions, 0 deletions