diff options
author | Zidan Wang <zidan.wang@freescale.com> | 2015-07-28 09:48:43 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-23 16:58:03 +0300 |
commit | f25cecc70c55ecf71087b90b52036cf3480c6f87 (patch) | |
tree | bf71757e3acf8e199abf266cbbb9917d4e6ecd47 | |
parent | 4f393fb23ab863848f0a9264e2e30b860ac185ff (diff) |
MLK-11291 radio-si476x: initialize local variable rangelow and rangehigh before using them
When transfer rangelow and rangehigh from user space, the local variable
rangelow and rangehigh will not be initialized before using them.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit c326f56005f0ee3d0c1fd6ebdebabda919c278dd)
-rw-r--r-- | drivers/media/radio/radio-si476x.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c index 271f725b17e8..cb7fcfb36c85 100644 --- a/drivers/media/radio/radio-si476x.c +++ b/drivers/media/radio/radio-si476x.c @@ -775,7 +775,8 @@ static int si476x_radio_s_hw_freq_seek(struct file *file, void *priv, rangelow = si476x_to_v4l2(radio->core, rangelow); else goto unlock; - } + } else + rangelow = seek->rangelow; if (!seek->rangehigh) { err = regmap_read(radio->core->regmap, SI476X_PROP_SEEK_BAND_TOP, @@ -784,7 +785,8 @@ static int si476x_radio_s_hw_freq_seek(struct file *file, void *priv, rangehigh = si476x_to_v4l2(radio->core, rangehigh); else goto unlock; - } + } else + rangehigh = seek->rangehigh; if (rangelow > rangehigh) { err = -EINVAL; |