Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1515758

[PATCH v2 10/34] [media] DaVinci-VPBE: Check return value of a setup_if_config() call in vpbe_set_output()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH v2 10/34] [media] DaVinci-VPBE: Check return value of a setup_if_config() call in vpbe_set_output()
Date 2016-11-06 21:10 +0100
Message-ID <sABVn-1zd-3@gated-at.bofh.it> (permalink)
References <srsHD-5Fa-11@gated-at.bofh.it> <srt10-5LT-19@gated-at.bofh.it> <szpjA-3NI-45@gated-at.bofh.it> <szxh7-sf-17@gated-at.bofh.it> <szHJv-7wH-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 6 Nov 2016 20:40:20 +0100

* 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>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---

v2: Keep the assignment statement on one line despite of its length
    of 82 characters.

 drivers/media/platform/davinci/vpbe.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 19611a2..d04d6b7 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 = 0;
@@ -257,5 +257,4 @@ static int vpbe_set_output(struct vpbe_device *vpbe_dev, int index)
 		}
 
-		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)
-- 
2.10.2

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH 10/34] [media] DaVinci-VPBE: Check return value of a  setup_if_config() call in vpbe_set_output() Hans Verkuil <hverkuil@xs4all.nl> - 2016-11-03 13:30 +0100
  Re: [PATCH 10/34] [media] DaVinci-VPBE: Check return value of a  setup_if_config() call in vpbe_set_output() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-11-03 22:00 +0100
    Re: [PATCH 10/34] [media] DaVinci-VPBE: Check return value of a  setup_if_config() call in vpbe_set_output() Hans Verkuil <hverkuil@xs4all.nl> - 2016-11-04 09:10 +0100
      [PATCH v2 10/34] [media] DaVinci-VPBE: Check return value of a  setup_if_config() call in vpbe_set_output() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-11-06 21:10 +0100

csiph-web