diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-11-01 17:05:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-11 13:04:51 -0500 |
commit | 02d7324337c0223f3775d539380e32f603646a52 (patch) | |
tree | 2579709a778712acb375ef4863dd19b6606a7bf7 /drivers/media/tuners | |
parent | bc3cad2b9261de7a5fa7632d30271e6d8418cb8f (diff) | |
download | linux-02d7324337c0223f3775d539380e32f603646a52.tar.gz linux-02d7324337c0223f3775d539380e32f603646a52.tar.bz2 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')
0 files changed, 0 insertions, 0 deletions