summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/davinci
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-10-12 06:22:23 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-16 12:55:50 -0200
commit19d4695a4fbde30881ad9005e7f46e569b1fc911 (patch)
tree0b2f255110ee86e98722a68be6646be87d7e4c62 /drivers/media/platform/davinci
parent2a0de2c84288fdf9381f6e2a85c0c6825221851e (diff)
downloadlinux-19d4695a4fbde30881ad9005e7f46e569b1fc911.tar.bz2
[media] DaVinci-VPFE-Capture: Move two assignments in vpfe_s_input()
Move assignments for two local variables into an else branch so that their setting will only be performed after corresponding data processing succeeded by this function. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/davinci')
-rw-r--r--drivers/media/platform/davinci/vpfe_capture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
index ca044bf1c05c..86509d2f274a 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -1109,7 +1109,7 @@ static int vpfe_s_input(struct file *file, void *priv, unsigned int index)
struct vpfe_subdev_info *sdinfo;
int subdev_index, inp_index;
struct vpfe_route *route;
- u32 input = 0, output = 0;
+ u32 input, output;
int ret;
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_s_input\n");
@@ -1142,6 +1142,9 @@ static int vpfe_s_input(struct file *file, void *priv, unsigned int index)
if (route && sdinfo->can_route) {
input = route->input;
output = route->output;
+ } else {
+ input = 0;
+ output = 0;
}
if (sd)