Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] staging: media: imx: fix Unneeded variable: "ret". Return "0"
@ 2019-05-18 17:38 Hariprasad Kelam
  2019-05-18 21:00 ` Fabio Estevam
  0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-05-18 17:38 UTC (permalink / raw)
  To: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	linux-media, devel, linux-arm-kernel, linux-kernel

fix below warning reported by  coccichec

drivers/staging/media/imx/imx-media-capture.c:617:5-8: Unneeded
variable: "ret". Return "0" on line 630

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@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 9430c83..b678857 100644
--- a/drivers/staging/media/imx/imx-media-capture.c
+++ b/drivers/staging/media/imx/imx-media-capture.c
@@ -614,7 +614,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);
 
@@ -627,7 +626,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.7.4


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

* Re: [PATCH] staging: media: imx: fix Unneeded variable: "ret". Return "0"
  2019-05-18 17:38 [PATCH] staging: media: imx: fix Unneeded variable: "ret". Return "0" Hariprasad Kelam
@ 2019-05-18 21:00 ` Fabio Estevam
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2019-05-18 21:00 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, linux-media,
	open list:STAGING SUBSYSTEM,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

On Sat, May 18, 2019 at 2:38 PM Hariprasad Kelam
<hariprasad.kelam@gmail.com> wrote:
>
> fix below warning reported by  coccichec
>
> drivers/staging/media/imx/imx-media-capture.c:617:5-8: Unneeded
> variable: "ret". Return "0" on line 630
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

Thanks

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-18 17:38 [PATCH] staging: media: imx: fix Unneeded variable: "ret". Return "0" Hariprasad Kelam
2019-05-18 21:00 ` Fabio Estevam

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org linux-media@archiver.kernel.org
	public-inbox-index linux-media


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/ public-inbox