linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Alan Cox <alan@linux.intel.com>
Cc: kbuild-all@01.org, devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging/atomisp: fix returnvar.cocci warnings
Date: Wed, 1 Mar 2017 18:30:19 +0800	[thread overview]
Message-ID: <20170301103019.GA31464@lkp-wsm-ep1> (raw)
In-Reply-To: <201703011837.1R4zsbQi%fengguang.wu@intel.com>

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;
 }
 
 /*

  parent reply	other threads:[~2017-03-01 10:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201703011837.1R4zsbQi%fengguang.wu@intel.com>
2017-03-01 10:30 ` [PATCH] staging/atomisp: fix platform_no_drv_owner.cocci warnings kbuild test robot
2017-03-01 10:30 ` kbuild test robot
2017-03-01 21:58   ` Daniel Glöckner
2017-03-01 22:26     ` Alan Cox
2017-03-01 22:44     ` Fengguang Wu
2017-03-01 10:30 ` kbuild test robot
2017-03-01 10:30 ` kbuild test robot
2017-03-01 10:30 ` kbuild test robot
2017-03-01 10:30 ` kbuild test robot
2017-03-01 10:30 ` kbuild test robot
2017-03-01 10:30 ` kbuild test robot
2017-03-01 10:30 ` kbuild test robot
2017-03-01 10:30 ` [PATCH] staging/atomisp: fix returnvar.cocci warnings kbuild test robot
2017-03-01 10:30 ` [PATCH] staging/atomisp: fix platform_no_drv_owner.cocci warnings kbuild test robot
2017-03-01 10:30 ` kbuild test robot
2017-03-01 10:30 ` kbuild test robot [this message]
2017-03-01 10:30 ` [PATCH] staging/atomisp: fix semicolon.cocci warnings kbuild test robot
2017-03-01 10:30 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170301103019.GA31464@lkp-wsm-ep1 \
    --to=fengguang.wu@intel.com \
    --cc=alan@linux.intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).