Commit 2eaa68f3 authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

[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: 9a7f95ad ("[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: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 64bab1a2
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment