summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-11-06 22:40:20 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-16 20:24:37 +0300
commit2eaa68f33b86bf9a6c6cbfaf773d74f1f8bddd4e (patch)
tree3135d4ed7b4b905d3d5c65267a1f45512894c9ea /drivers/media/platform
parent64bab1a20c21875dd021e426ec9d8a21dfb4b3ac (diff)
downloadlinux-2eaa68f33b86bf9a6c6cbfaf773d74f1f8bddd4e.tar.xz
[media] DaVinci-VPBE: Check return value of a setup_if_config() call in vpbe_set_output()
* A function was called over the pointer "setup_if_config" in the data structure "venc_platform_data". But the return value was not used so far. Thus assign it to the local variable "ret" which will be checked with the next statement. Fixes: 9a7f95ad1c946efdd7a7a72df27db738260a0fd8 ("[media] davinci vpbe: add dm365 VPBE display driver changes") * Pass a value to this function call without storing it in an intermediate variable before. * Delete the local variable "if_params" which became unnecessary with this refactoring. Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> 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')
-rw-r--r--drivers/media/platform/davinci/vpbe.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 7dcdb7f4b323..8c8cbeb7d90f 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -227,7 +227,6 @@ static int vpbe_set_output(struct vpbe_device *vpbe_dev, int index)
vpbe_current_encoder_info(vpbe_dev);
struct vpbe_config *cfg = vpbe_dev->cfg;
struct venc_platform_data *venc_device = vpbe_dev->venc_device;
- u32 if_params;
int enc_out_index;
int sd_index;
int ret;
@@ -257,8 +256,7 @@ static int vpbe_set_output(struct vpbe_device *vpbe_dev, int index)
goto unlock;
}
- if_params = cfg->outputs[index].if_params;
- venc_device->setup_if_config(if_params);
+ ret = venc_device->setup_if_config(cfg->outputs[index].if_params);
if (ret)
goto unlock;
}