All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: imx: capture: Remove unneeded variable
@ 2018-10-19  1:40 Kimberly Brown
  2018-10-19  7:04 ` [Outreachy kernel] " Julia Lawall
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kimberly Brown @ 2018-10-19  1:40 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman

Remove local variable 'ret', which is used to store the return value.
It is not changed during function execution. Return the variable's
initial value, 0. Issue found by coccicheck.

Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
---
 drivers/staging/media/imx/imx-media-capture.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
index 256039ce561e..f50f34b59694 100644
--- a/drivers/staging/media/imx/imx-media-capture.c
+++ b/drivers/staging/media/imx/imx-media-capture.c
@@ -536,7 +536,6 @@ static int capture_release(struct file *file)
 	struct capture_priv *priv = video_drvdata(file);
 	struct video_device *vfd = priv->vdev.vfd;
 	struct vb2_queue *vq = &priv->q;
-	int ret = 0;
 
 	mutex_lock(&priv->mutex);
 
@@ -549,7 +548,7 @@ static int capture_release(struct file *file)
 
 	v4l2_fh_release(file);
 	mutex_unlock(&priv->mutex);
-	return ret;
+	return 0;
 }
 
 static const struct v4l2_file_operations capture_fops = {
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-19 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-19  1:40 [PATCH] media: imx: capture: Remove unneeded variable Kimberly Brown
2018-10-19  7:04 ` [Outreachy kernel] " Julia Lawall
2018-10-19  9:55 ` Philipp Zabel
2018-10-19 15:57 ` Steve Longerbeam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.