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


Groups > linux.kernel > #1590206 > unrolled thread

[PATCH] staging/atomisp: fix returnvar.cocci warnings

Started bykbuild test robot <fengguang.wu@intel.com>
First post2017-03-01 11:40 +0100
Last post2017-03-01 11:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] staging/atomisp: fix returnvar.cocci warnings kbuild test robot <fengguang.wu@intel.com> - 2017-03-01 11:40 +0100

#1590206 — [PATCH] staging/atomisp: fix returnvar.cocci warnings

Fromkbuild test robot <fengguang.wu@intel.com>
Date2017-03-01 11:40 +0100
Subject[PATCH] staging/atomisp: fix returnvar.cocci warnings
Message-ID<tg9PS-1LH-63@gated-at.bofh.it>
drivers/staging/media/atomisp/pci/atomisp2/./atomisp_ioctl.c:560:5-8: Unneeded variable: "ret". Return "0" on line 577


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Alan Cox <alan@linux.intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 atomisp_ioctl.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/staging/media/atomisp/pci/atomisp2/./atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/./atomisp_ioctl.c
@@ -557,8 +557,6 @@ const struct atomisp_format_bridge *atom
 static int atomisp_querycap(struct file *file, void *fh,
 			    struct v4l2_capability *cap)
 {
-	int ret = 0;
-
 	memset(cap, 0, sizeof(struct v4l2_capability));
 
 	WARN_ON(sizeof(DRIVER) > sizeof(cap->driver) ||
@@ -574,7 +572,7 @@ static int atomisp_querycap(struct file
 	cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
 	    V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT;
 	cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
-	return ret;
+	return 0;
 }
 
 /*

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web