Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1590206
| From | kbuild test robot <fengguang.wu@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] staging/atomisp: fix returnvar.cocci warnings |
| Date | 2017-03-01 11:40 +0100 |
| Message-ID | <tg9PS-1LH-63@gated-at.bofh.it> (permalink) |
| References | <tg9PP-1LH-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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;
}
/*
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] staging/atomisp: fix returnvar.cocci warnings kbuild test robot <fengguang.wu@intel.com> - 2017-03-01 11:40 +0100
csiph-web