From f25cecc70c55ecf71087b90b52036cf3480c6f87 Mon Sep 17 00:00:00 2001 From: Zidan Wang Date: Tue, 28 Jul 2015 09:48:43 +0800 Subject: 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 (cherry picked from commit c326f56005f0ee3d0c1fd6ebdebabda919c278dd) --- drivers/media/radio/radio-si476x.c | 6 ++++-- 1 file 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; -- cgit v1.2.3